Hi all,
The below code doesn't seem to be working:
I want to open up the Holidays file and copy "Holidays " tab and paste into the Active Workbook from which I initiated the macro.
However I get an message : Run-time error '1004'
Copy method of Worksheet class failed.
Help on this would be really helpful!
Thanks!
The below code doesn't seem to be working:
VBA Code:
Sub CopySheet()
Application.ScreenUpdating = False
Set closedBook = Workbooks.Open("C:\Users\040429\Documents\Workings\Excel\_Holidays_.xlsb")
closedBook.Sheets("Holidays ").Copy Before:=ThisWorkbook.ActiveSheet
closedBook.Close SaveChanges:=False
Application.ScreenUpdating = True
End Sub
I want to open up the Holidays file and copy "Holidays " tab and paste into the Active Workbook from which I initiated the macro.
However I get an message : Run-time error '1004'
Copy method of Worksheet class failed.
Help on this would be really helpful!
Thanks!