Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Subscript out of range means you don't have a worksheet named "Sheet1"
In the second example, subscript out of range would mean the same - no Sheet1, but eventually, if you clear that up, you will get an error if the named sheet is not the activesheet. With Worksheets("Sheet1") set rng = .Range(.Cells(1, 1), .Cells(5, 5)) End With -- Regards, Tom Ogilvy paul reed wrote in message ... Hello, I have spreadsheet and I am building a macro in the VB Editor. Whenever I try to reference a range likes this: Worksheets("Sheet1").Range("A6:D10") or like this... Worksheets("Sheet1").Range(Cells(1, 1), Cells(5, 5)) I get a subscript out of range...there is definitely data in those cells for sure. I am do a lot of programming...but this one is not obvious to me for some reason. Thanks in advace, Paul |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Subscript out of range | Excel Discussion (Misc queries) | |||
Subscript out of Range | Excel Discussion (Misc queries) | |||
what does 'Subscript Out of range' mean?? | Excel Worksheet Functions | |||
9: Subscript out of range | Excel Discussion (Misc queries) | |||
Subscript Out of Range | Excel Programming |