ReDim X(d1{,d2,d3,...})

The ReDim statement allows you to change the dimensions of an existing array while retaining the contents of the array.

Dim A(0)

ReDim A(10)

ReDim A(10,10)

ReDim A(10)

ReDim A(0)

When a ReDim command is executed a new array is created with the requested dimensions. The contents of the old array (or as much as will fit) is copied to the new array. The result is the same array re-dimensioned.

Arrays and Subscripts

Become a Patron