I'm looking to copy some data form one sheet to another. The code I'm using is shown below, and works when I'm copy from the the "Table" sheet to the "Table" sheet but errors when I copy from the "Data" sheet to the "Table" sheet. The numbers in the cell references are actualy going to be replaced with variables as the range changes due to user inputs.
Works:
Sheets("Table").Range(Cells(2, 3), Cells(2, 4)).Copy _
Destination:=Sheets("Table").Range("B21")
Fails:
Sheets("Data").Range(Cells(2, 3), Cells(2, 4)).Copy _
Destination:=Sheets("Table").Range("B21")
I'm new to VBA so parden the weak question
Thanks
Works:
Sheets("Table").Range(Cells(2, 3), Cells(2, 4)).Copy _
Destination:=Sheets("Table").Range("B21")
Fails:
Sheets("Data").Range(Cells(2, 3), Cells(2, 4)).Copy _
Destination:=Sheets("Table").Range("B21")
I'm new to VBA so parden the weak question
Thanks