History  | 
ReDim (BASIC command) 
Purpose 
Changes the number of elements in an array. 
Using this command on an existing array will replace the old array dimension with the new one. 
Syntax 
ReDim VarName As VarType 
ReDim Preserve VarName As VarType 
ReDim VarName (ArrayUpperBound) As VarType 
ReDim VarName (ArrayLowerBound To ArrayUpperBound) As VarType 
ReDim VarName1 As VarType, Varname2 As VarType... 
 For an explanation of the rest of this syntax, see Dim. 
Example 
ReDim Preserve MyArray (MAXVAL+1) As Integer 
 | ||||