Hi
I am trying to Redim a multi dimension array.
I have declared the array at the top of the module as
Dim DataStor as variant
Then in the sub i have a loop
For i = 1 to XYZ
r = r +1
Redim Preserve DataStor(r,16)
DataStor(r,1) = Unit
DataStor(r,2) = Time
etc
Next i
it picks up the values when r = 1 but on the next loop it says subscipt out of range. I am trying to get it to hold x rows and 16 columns of data to eventually transfer into a sheet
I am trying to Redim a multi dimension array.
I have declared the array at the top of the module as
Dim DataStor as variant
Then in the sub i have a loop
For i = 1 to XYZ
r = r +1
Redim Preserve DataStor(r,16)
DataStor(r,1) = Unit
DataStor(r,2) = Time
etc
Next i
it picks up the values when r = 1 but on the next loop it says subscipt out of range. I am trying to get it to hold x rows and 16 columns of data to eventually transfer into a sheet