I'm trying to define and use an array in a loop.
so I use
Dim MyArray() as string outside my loop
then in my loop I determine the size and
Redim MyArray (Mycount, 4)
when the loop comes back this redim statement gives a 'subscript out range error'
I have tried adding
Erase MyArray() just before the next
didn't change anything
and I have also tried moving the Dim statement into the loop, same error.
the array is used to read a matrix of data (x rows, 4 columns) to place this on a report in another sheet...
it works fine for the first loop, but apparently the 'redefining' the array is giving the issue.