Hello guys,
I have a problem and I cannot solve it's super puzzling.
I have a macro that's been working fine and today it started giving me a Subscript out of Range error right before looping through an array.
My array is global and declared:
Funny thing is that the array does hold a value at Arr(1,0). If I change it to Arr(1,1) move one line down and then change it back to what it was before the code runs with no problems.Public Arr(1 To 1000, 0 To 8) As Variant Dim sh(1 To 1000) As Variant i = 1 x = 1 Do Until Arr(i, 0) = Empty ' I am getting the error here sh(x) = Arr(i, 0) x = x + 1 i = i + 1 Loop
I have tried restarting Excel, deleting the temp files and the Appdata.
No luck any suggestions?
Thanks a lot for the help guys.