answersLogoWhite

0

The ReDim command reallocates the storage space of an array variable.

So for example, if you did the following:

Dim Arr_TestArray(9, 2) as Integer

To create an integer array with 10 x 3 elements, and wanted to resize it to 5 x 5 elements you would do the following:

ReDim Arr_TestArray(4, 4)

You will however lose all the existing data stored in that array unless you use the Preserve command alongside it.

(Note: Arrays have a zero element in .net so by declaring an array length of 4, it will ifnact have 5 elements)

User Avatar

Wiki User

15y ago

What else can I help you with?