Copy to end of sheets, another file

I

Inkmuser

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?
 
I

Inkmuser

Thanks! That did the trick...
Gary

Norie said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top