Preserves the data within an array when changing its single or its last dimension.
Data Type: Any
Name of the variable.
Number of elements and dimensions of the array, using the following syntax:
upper] . . .
upper is the upper
bound of a particular array dimension.
Used within a procedure to resize and reallocate storage space for a dynamic array.
A dynamic array is created using a
Dim statement with empty parentheses.
Only dynamic arrays created in this manner can be resized using
ReDim statement. There is
no limit to the number of times you can redimension a dynamic
Use of the
keyword allows you to retain the current values within the
array, but it also places several limitations on how the
Redim statement can be
Only the last dimension of an array can be resized.
The number of dimensions can’t be changed.
Only the upper bound of the array can be changed.
If you reduce either the number of elements of the array
or the number of dimensions in the array, data in the removed
elements is permanently lost, irrespective of the use of the
You can pass an array by reference to a procedure, redimension it within the procedure, and return the modified array to the calling program. This is illustrated ...