Erase Instruction
Syntax:
Erase arrayvar[, ...]
-or-
Erase usertypevar.elem[, ...]
Group:Assignment
Description:
Reset arrayvar or user defined type array element to zero. (Dynamic arrays are reset to undimensioned arrays.) String arrays values are set to a null string. arrayvar must be declared as an array.
• Declare with Dim, Private, Public or Static.
• Declare as a parameter of Sub, Function or Property definition.
Example:
Sub Main
Dim X%(2)
X%(1) = 1
Erase X%
Debug.Print X%(1) ' 0