Data Type: Variant array
A list of array variables to clear.
Resets the elements of an array to their initial (unassigned)
values. In short,
out” or empties an array.
Specify more than one array to be erased by using commas
Fixed array variables remain dimensioned; on the other hand, all memory allocated to dynamic arrays is released.
TypeName returns “Variant( )” for a
fixed-length array; in addition, the
IsEmpty function returns
True when individual members of the
array are passed to it, and comparisons of an individual member
of the array with an empty string (
"") and with zero both return
True. On the other hand, the
TypeName function returns Empty for a
dynamic array, and comparisons of the array with an empty string
"") and zero also return
Once you use
Erase to clear
dynamic arrays, they must be redimensioned with
ReDim before being used again. This is
Erase releases the memory
storage used by the dynamic array back to the operating system,
which sets the array to have no elements.
Because VBA can be strongly typed, the behavior of the
Erase statement in clearing a
fixed array varies, depending on the array’s data type. The effect
Erase statement on a fixed
variant array in VBScript is described earlier in the “Rules at