Hi,
I do not understand while this does not work
Workbooks("New Data.xlsx").Worksheets("Export").Range("A2:D9").Copy _
Workbooks("Reports.xlsm").Worksheets("Data").Range("A2")
The "run time error 9 / Subscript out of range" message is shown. It seems that it losts the data just copied while executing the second part of the code row "Workbooks("Reports.xlsm").Worksheets("Data").Range("A2")" because it moves to the second workbook (Reports). Both workbooks are open while executing the code.
This does not happen executing this code remaining to the same workbook.
Workbooks("New Data.xlsx").Worksheets("Export").Range("A2:D9").Copy _
Workbooks("New Data.xlsx").Worksheets("Sheet1").Range("A2")
Thanks for your help
I do not understand while this does not work
Workbooks("New Data.xlsx").Worksheets("Export").Range("A2:D9").Copy _
Workbooks("Reports.xlsm").Worksheets("Data").Range("A2")
The "run time error 9 / Subscript out of range" message is shown. It seems that it losts the data just copied while executing the second part of the code row "Workbooks("Reports.xlsm").Worksheets("Data").Range("A2")" because it moves to the second workbook (Reports). Both workbooks are open while executing the code.
This does not happen executing this code remaining to the same workbook.
Workbooks("New Data.xlsx").Worksheets("Export").Range("A2:D9").Copy _
Workbooks("New Data.xlsx").Worksheets("Sheet1").Range("A2")
Thanks for your help