0

I had an 2 dimension array, (1 to 406, 1 to 8)

when I try to redim and perserve the value

 ReDim Preserve arr(1 To UBound(arr()) + 1, 1 To 8)

it pop out error Subscript out of range, what actually Im doing wrong?

Community
  • 1
  • 1
Se0ng11
  • 2,303
  • 2
  • 26
  • 45

1 Answers1

0

You can only ReDim Preserve the last dimension in a multidimensional array with VBA, which is a great feature.

There are some workarounds to this issue described in this answer.

Community
  • 1
  • 1
mattboy
  • 2,870
  • 5
  • 26
  • 40