Array handling error
Hi
It's not easy to make good suggestions when you can't see your full
code, but have you ReDimensioned the YearD() dynamic array prior to
attempting to place values in it?
Best regards
Richard
PALysiak wrote:
I am trying to extract all of the column 9 data in the GoodArray(), earlier
in the program it is filled with data (I checked the locals window, it is
dimensioned properly and filled with what I want). When I go to take the data
from cell or column 9 from a 2 dimensional array and do a "Left" operation on
the data string in the cell and put it in a 1 dimensional array, I get an
"Out of Range" error. I added the "Dummy" variable to see if the Left
function worked and it does. It just refuses to take the column in a two
dimensional array and put it into a one dimensional array. What am I doing
wrong?
Dim YearD() as variant
Dim A As String
Dim Dummy as String
Dummy = GoodArray(9, i)
A = Left(Dummy, 2)
YearD(i) = Left(Dummy, 2) 'Extract the year
YearD(i) = Right(YearD(i), 1)
|