Open
Description
Consider:
Dim foo()
'...
Do
Redim Preserve foo(UBound(foo) + 1)
foo(UBound(foo)) = n
'...
While {condition}
Rubberduck should point out that the redimensioning is inefficient and excessive, and suggest using a Collection
instead of an array, if the number of elements isn't known from the start.