Share via


'ReDim' cannot change the number of dimensions of an array

You have attempted to use ReDim to change the rank (number of dimensions) of an array. The ReDim statement can be used to change the size of one or more dimensions of an array that has already been formally declared, but it cannot change the rank of an array.

Error ID: BC30415

To correct this error

  • Make sure that you intend the rank instead of the sizes of the array, and if possible, use Dim to declare a new array with the desired rank.

See Also

Concepts

Overview of Arrays in Visual Basic

Reference

ReDim Statement (Visual Basic)

Dim Statement (Visual Basic)