Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Count rows in multi dim array

Status
Not open for further replies.

Microbe

Programmer
Oct 16, 2000
607
AU
Hey all,

uBound(array) retruns the number of columns in an array, i.e. if I have an of size array(x,y) uBound returns x, how can I discover y?
Steve Davis
hey.you@hahaha.com.au
 
Code:
UBound(array[x])
where
Code:
x
equals the index of the array you want the size for. I can't remember if VB allows multi-dimensional arrays of different sizes. Wushutwist
 
Thanks for that and I managed to solve it...ubound(array,x) where x is the dimension, is the way to do it.

VB does allow MD arrays, you justhave to "redim preserve array(a,b)" to resize it and keep the data intact. Steve Davis
hey.you@hahaha.com.au
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top