I'm getting the infamous Run-time error when I run this code, and I don't understand why:
With ThisWorkbook.Sheets("Data")
.Range(Cells(row1, column1), Cells(row2, column1)).Copy
End With
row1, column1 and row2 are all defined as Integers.
The error pops up for the second line of code.
Can I get some insight please?
Where are you coping the range to. The proper format is
source.copy destination
You forgot the "." before
Cells
(as you are within theWith
scope of the Sheet Data)Tested the above example and now it works for me.