I have to copy several worksheets from one workbook A to another workbook B. The worksheets I have to copy go from the 13th sheet in workbook A to the last sheet, and have to be copied over to workbook B. Each copied sheet goes at the end of workbook B. Currently, workbook B has 7 sheets.
I have tried the following code, but I keep on getting a 'workbook' error. Can someone please, please assist? Thank you.
Windows("A.xls").Activate
For counter = 13 To ActiveWorkbook.Sheets.Count
Sheets(counter).Copy After:=Workbooks("B.xls").Sheets(Workbooks("B.xls").Sheets.Count)
I have tried the following code, but I keep on getting a 'workbook' error. Can someone please, please assist? Thank you.
Windows("A.xls").Activate
For counter = 13 To ActiveWorkbook.Sheets.Count
Sheets(counter).Copy After:=Workbooks("B.xls").Sheets(Workbooks("B.xls").Sheets.Count)