Copy to end of sheets, another file
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?
|