PDA

View Full Version : [SOLVED] HELP GETTING DIMENSIONS OF A VARIANT ARRAY



ytjjjtyj
06-25-2019, 07:42 AM
Hello,
I have a variable called Table as a variant. In this table, there are strings and doubles. I have finished putting a bunch of strings and values and now I want to find how big it is (how many rows and columns it has). How do I do that?
I saw there is something for ranges by using range.address to find it's dimensions so how do I do something like that with my variant? If there is nothing like that I can do, how to i find how many rows and columns it has?

Paul_Hossler
06-25-2019, 08:36 AM
For a one dimensional array

x = LBound(ary) and y =UBound(ary)


or if more that one dimension



x = LBound(ary,1) and y =UBound(ary,1)



x = LBound(ary,2) and y =UBound(ary,2)


Subtract if necessary to find number of rows


num = UBound(ary) - L
Bound(ary) + 1

ytjjjtyj
06-25-2019, 01:25 PM
Thank you!