I get a Run-Time error 1004 if I run the sub with the commented out lines active. It runs fine as is, but I need to increment the array to read more data in another loop. I'd prefer to use the Range(Cells option.
Option Explicit
Dim myarray As Variant
'There are 6 numbers stored in a1 to a6 on sheet1
Sub read_as_entire_()
'This line fails if I use Cells...
'myarray = Worksheets("Sheet2").Range(Cells(1, 1), Cells(6, 1)).Value
'This line works fine
myarray = Worksheets("Sheet2").Range("a1:a6").Value
Sheet2.Range("b1:b6") = myarray
'Sheet2.Range(Cells(1, 2), Cells(6, 2)) = myarray
End Sub
What's the difference?