Sharad wrote:
When one is not sure how many elements can be expected in the array,
when he wants to populate the elements during run time.
Just a crude example:- I want to build an arry based on two columns in a
worksheet. I do not know how may of the rows in these column will
actually have data in it. So I first find out how may rows are actually
used during run time and then will Redim the array, then popuate the
array.
Compared to defining an Array with Dim (1000, 1000) so that may array
will never be short of elements,
I will be saving memory space used by the array, number of calculation
which I will be performing on the array elements, by using dymanic
array.
Sharad
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Thanks for the response, Sharad. I get from the above why one would use
Dim arr
Redim arr(20,10)
My question is when, if ever, would one want to use
Dim arr(20,10) instead.
Thanks again,
Alan Beban