I find that I do not understand how ranges and arrays interact.
Fo instance
Dim RowArray(20)
RowArray = .Range(.Cells (a,1),.Cells(a,21).Value
is greeted with the message "Cannot assign to an array"
Whereas this code
Dim RowArray()
ReDim RowArray(x)
RowArray =.Range(.Cells (a,1),.Cells(a,1+x).Value
Does not give an error message though you do get "subscript out of range" when you try and access an element of the array.
Why should this be.
I am sure that it is possible to load a range into an array without going through each cell with a For loop
but I can't find out how. Can anyone help please
John
Bookmarks