9.0
224
ReDim [Preserve] name[type][([dim[, ...]])] [As type][, ...]
-or-
ReDim [Preserve] usertypevar
.elem[type][([dim[, ...]])] [As type][, ...]
Group
Declaration
Description
Redimension a dynamic arrayvar or user defined type 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
Sub Main
Dim
X()
ReDim X(3)
Debug
.Print UBound(X) ' 3
ReDim X(200)
Debug.Print UBound(X) ' 200
End
Sub
Reference Comment
Syntax
'#Reference {uuid}#vermajor.verminor#lcid#[path[#name]]
Description
The Reference comment indicates that the current macro/module references the type library identified. Reference
comment lines must be the first lines in the macro/module (following the global Attribute
s). Reference comments
are in reverse priority (from lowest to highest). The IDE does not display the reference comments.
Parameter Description
uuid Type library's universally unique identifier.
vermajor Type library's major version number.
verminor Type library's minor version number.
lcid Type library's locale identifier.
path Type library's path.
name Type library's name.
Example
'#Reference {00025E01-0000-0000-C000-000000000046}#4.0#0#C:\PROGRAM FILES\COMMON
FILES\MICROSOFT SHARED\DAO\DAO350.DLL#Microsoft DAO 3.5 Object
Library










