Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Ubound for variant not working for some reason, can anyone see why?
I have an array inside a variant which has 6,000 rows and two columns, when I try to read its Ubound value it returns 3! There's really nothing to the code so I know there's not too much to go on:
Dim lNoRowsExistingData As Long lNoRowsExistingData = UBound(pvarrCht1, 1) I checked the array (pvarrCht1) just before the code executes it appears to be correct (with 600 rows, two columns),anyone any idea why this doesn't work it's very bafflng? Any help much appreciated, kind regards, Mark |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Ubound for variant not working for some reason, can anyone seewhy? SOLVED
On Wednesday, 23 April 2014 10:42:29 UTC+7, Mark Stephens wrote:
I have an array inside a variant which has 6,000 rows and two columns, when I try to read its Ubound value it returns 3! There's really nothing to the code so I know there's not too much to go on: Dim lNoRowsExistingData As Long lNoRowsExistingData = UBound(pvarrCht1, 1) I checked the array (pvarrCht1) just before the code executes it appears to be correct (with 600 rows, two columns),anyone any idea why this doesn't work it's very bafflng? Any help much appreciated, kind regards, Mark Sorry realised my error I didn't dimension the array properly! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
trouble assigning array to variable (variant) runtime error 9 please help (ignore correction, this didn't appear for some reason) | Excel Programming | |||
Using created variant value to reference to a variant within my code | Excel Programming | |||
Ubound matrix | Excel Programming | |||
UBound | Excel Programming | |||
Array Ubound | Excel Programming |