![]() |
Copy to end of sheets, another file
I cannot get this working right. Trying to copy sheet from active (open) file
over to another, also open, file...but at the end of the sheets in the target file. Sheet count in the target file will be constantly changing. Current code: ActiveSheet.Copy After:=Workbooks( _ "PPSurveys-Master.xls").Worksheets(Worksheets.Count) Result is the sheet is copied to the external file...but inserted after the first tab, not at the end. Have tried Sheets(Sheets.Count), ActiveWorksheet(ActiveWorksheet.Count) and other approaches, but it always copies (or moves) into the second position, never after the desired last tab! Any ideas? |
Copy to end of sheets, another file
Thanks! That did the trick...
Gary "Norie" wrote: Your Worksheets.Count doesn't have a workbook reference so will refer to the worksheets in the active workbook. With Workbooks("PPSurveys-Master.xls") ActiveSheet.Copy After:= .Worksheets(.Worksheets.Count) End With "Inkmuser" wrote in message ... I cannot get this working right. Trying to copy sheet from active (open) file over to another, also open, file...but at the end of the sheets in the target file. Sheet count in the target file will be constantly changing. Current code: ActiveSheet.Copy After:=Workbooks( _ "PPSurveys-Master.xls").Worksheets(Worksheets.Count) Result is the sheet is copied to the external file...but inserted after the first tab, not at the end. Have tried Sheets(Sheets.Count), ActiveWorksheet(ActiveWorksheet.Count) and other approaches, but it always copies (or moves) into the second position, never after the desired last tab! Any ideas? |
All times are GMT +1. The time now is 04:12 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com