|
|
Q7013 How Do I Re-Dimension Arrays?
irt.org | Knowledge Base | VBScript | Q7013 [ previous next ] Q7013 How Do I Re-Dimension Arrays?You may only re-dimension dynamic arrays. To do so, use the ReDim statement in the same manner as either the Dim, Public, or Private statments. For example to re-dimension an existing dynamic array you could go:
Note that using the ReDim statement will reset all data within the array. To keep the data from being erased use the Preserve statement in conjuction with the ReDim statement like so:
There is no limit to the number of times you can resize a dynamic array, but if you make an array smaller than it was, the data in the eliminated elements will be lost. |
-- div -->
|