G
Guest
In response to an answer to my earlier question, I'm trying to load the
contents of a range into an array, page through it and make some changes, and
then dump the changes back into the range. However, I seem to get a
"Subscript out of range" error whenever I try to actually change anything in
the array. Below is the relevant code:
Dim arrCols
Set objR = objWS.Range(objWS.Cells(2, J), objWS.Cells(lngCurrentRow, J))
arrCols = objR.Value
MsgBox UBound(arrCols) ' In my test ~ 8,000
arrCols(1) = 555555 ' ERROR - tried with "5555555" also
objR.Value = arrCols
contents of a range into an array, page through it and make some changes, and
then dump the changes back into the range. However, I seem to get a
"Subscript out of range" error whenever I try to actually change anything in
the array. Below is the relevant code:
Dim arrCols
Set objR = objWS.Range(objWS.Cells(2, J), objWS.Cells(lngCurrentRow, J))
arrCols = objR.Value
MsgBox UBound(arrCols) ' In my test ~ 8,000
arrCols(1) = 555555 ' ERROR - tried with "5555555" also
objR.Value = arrCols