Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
range object error
I'm using Excel 2000, and trying to modify a range name within VBA. When I
try code such as this - Dim row, col as integer row = 1 col = 1 ActiveWorkbook.Names.Add Name:="WHData", _ RefersTo:= Range(Cells(row, col), Cells(row + UBound(MyArray) - 1, col + 3)) I get 1004 Application-defined or object-defined error. I have confirmed that UBound(MyArray) is defined, and in my code I have logic that changes the values of row and col. To test, I used the following, and did not get this error - ActiveWorkbook.Names.Add Name:="WHData", RefersTo:= Range("A1:C5") What am I missing to be able to use cells(rwindex, colindex) to set the range? Thanks! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
STUPID range object error | Excel Programming | |||
Range Object error | Excel Programming | |||
peculiar error with Range() object | Excel Programming | |||
error 1004 Range object | Excel Programming | |||
Range Question / error 1004: method Range of object Worksheet has failed | Excel Programming |