Hi,
I am trying to create a macro that can copy a sheet from another workbook to the workbook that I'm currently using.
I have both workbooks in the same folder.
Copy Workbook1.xlsx sheet named "Schedule" onto test.xlsm
Is there something wrong with the code that I'm using below:
And if I want to be copying sheets from several different workbooks (Workbook2, Workbook3, and etc), do I just keep adding the same three lines and changing the file names?
I am trying to create a macro that can copy a sheet from another workbook to the workbook that I'm currently using.
I have both workbooks in the same folder.
Copy Workbook1.xlsx sheet named "Schedule" onto test.xlsm
Is there something wrong with the code that I'm using below:
Code:
Sub MoveSheets()
Windows("Workbook1.xlsx").Activate
Sheets("Schedule").Select
Sheets("Schedule").Copy Before:=Workbooks("test.xlsm").Sheets(1)
End Sub
And if I want to be copying sheets from several different workbooks (Workbook2, Workbook3, and etc), do I just keep adding the same three lines and changing the file names?
Last edited: