View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default how to redim more than one dimension in a multidimensional dynamic array?

Only the last I am afraid. You need to start with the others as big as you
will ever need. Perhaps your loops could exit on an empty element, like this

For i = LBound(ary, 1) To UBound(ary, 1)
If IsEmpty(ary(i, 1)) Then
MsgBox i
Exit For
End If
Next i


--

HTH

RP
(remove nothere from the email address if mailing direct)


"lvcha.gouqizi" wrote in message
oups.com...
As I searched previous posts, I get the point that only the last
dimension can be redimed. I am wondering what if both dimensions are
need to be redimed? I have a 4 dimensional array, and each dimension
has a big upperbound. If I define all of them to be fixed expect for
the last dimension, it will result in many unnecessary loops. Any
suggestions?

Thanks.