Thread: Set Range error
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Randy Spleen Randy Spleen is offline
external usenet poster
 
Posts: 1
Default Set Range error


I'd appreciate some insight about setting ranges with Excel 2003 VBA.
In particular, why does THIS work

Dim fromRange as Range
....
Worksheets("AAdata").Activate
Set fromRange = Range(Cells(2, 4), Cells(2, 11))



And THIS give a Run-time "Application-defined or object-defined error",
#1004, error:

Dim fromRange as Range
....
Set fromRange = Worksheets("AAdata").Range(Cells(2, 4), Cells(2, 11))


TIA
R. Spleen