ReDim Preserve “Subscript Out of Range”

To summarise the comments above into an answer:

  • You can only redim the last dimension of a multi dimension array when using Preserve.

Therefore in order to resize a multiple dimension array there are a couple of simple options:

  1. If only one dimension needs to be resized flip the loops and logic around so that the dimension to be resized becomes the last dimension
  2. If both dimensions must be resized use either an array of arrays or a collection of arrays and correct the loops as required

Leave a Comment