You attempted to use ReDim to change the number of elements in an array of constant size. Arrays declared as dynamic, or arrays within Variant variables can be temporarily locked.

To correct this error

  • If the array is declared within a procedure, use the function ReDim to change it from static to dynamic.

  • If the array is declared at the module level, declare the array without specifying the number of elements.

See Also