I\'ve got a very simple procedure that copies a range from one workbook and pastes it into another; the issue is, I\'m getting the error in the title on the paste
You can Copy
and Paste
Ranges
between sheets (and workbooks) using 1 line of code, just replace your code with the line below:
x.Sheets(1).Range("A1").CurrentRegion.Copy y.Sheets("DTR").[a1]
If you want to use the PasteSpecial
method, you got to do it in 2 lines, but you need to add a parameter after the PasteSpecial
, like xlValues
, etc.
x.Sheets(1).Range("A1").CurrentRegion.Copy
y.Sheets("DTR").[a1].PasteSpecial xlValues