Home |
Search |
Today's Posts |
#23
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
"Harlan Grove" wrote...
.... While I tested the first case, I did so in XL8/97, so under a different VBA version. It does fail in XL8/97. I'll check under XL2K when I get home. It'd be very odd if XL2K/VBA6 doesn't throw an error when attempting to set a range reference to a simple value. It's not that. Excel is stranger than fiction sometimes. Pass an unsized dynamic array of objects to another procedure as a variant argument, and Excel 2000/VBA 6 treats the passed array of object references as having LBound 0 and UBound -1. How silly of me not to have realized this. Anyway, it looks like another revision is needed. Replace ub1 = UBound(b, 1) ct = (Err.Number < 9) 'only subscript out of range error with ub1 = UBound(b, 1) - LBound(b, 1) ct = (Err.Number < 9 Or ub1 < 0) 'only subscript out of range error |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Declaring a value to equal 100% | Charts and Charting in Excel | |||
Declaring Variables | Excel Programming | |||
DEclaring variables | Excel Programming | |||
Declaring variables | Excel Programming | |||
DEclaring variables | Excel Programming |