I want to copy the content of a worksheet of a workbook to another workbook.
This code only opens both workbooks, not copying and pasting values.
Sub btnClickMev2()
Dim x As Workbook
Dim y As Workbook
'Open Workbooks
Set x = Workbooks.Open("H:\Desktop\test.xls")
Set y = Workbooks.Open("H:\Desktop\Book1v3.xlsm")
'Copy from x Workbook
x.Sheets("Query2").Range("A1:T1036").Copy
'Paste to Y Workbook
y.Sheets("Sheet2").Range("A1:T1036").PasteSpecial
'Close x:
x.Close
End Sub