Syntax ReDim [Preserve] vardeclaration [As type][, ...]
Group Declaration
Description Redimension a dynamic arrayvar or user defined structure array element. Use Preserve to keep the array values. Otherwise, the array values will all be reset. When using preserve only the last index of the array may change, but the number of indexes may not. (A one-dimensional array can't be redimensioned as a two-dimensional array.)
See Also Dim, Option Base, Private, Public, Static.
Example '#Language
"WWB.NET"
SubMain
Dim X()
ReDim X(3)
Debug.PrintUBound(X)
' 3
ReDim X(200)
Debug.PrintUBound(X)
' 200
EndSub