Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 124
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 124
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
trouble assigning array to variable (variant) runtime error 9 please help (ignore correction, this didn't appear for some reason) mark Stephens Excel Programming 0 July 26th 09 04:52 PM
Using created variant value to reference to a variant within my code TD[_3_] Excel Programming 1 April 22nd 09 11:53 AM
Ubound matrix Arne Hegefors Excel Programming 7 October 12th 07 06:43 PM
UBound Arturo Excel Programming 5 January 26th 07 04:06 PM
Array Ubound gti_jobert[_71_] Excel Programming 6 March 27th 06 10:34 PM


All times are GMT +1. The time now is 05:04 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"