Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 82
Default 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?


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
copy&paste 28 individual files into one file/28 work sheets Yvez T.T. Constance Excel Worksheet Functions 1 November 18th 07 10:54 AM
Copy Visible Sheets to New File Troubled User Excel Programming 3 September 9th 07 10:26 PM
copy the same raws of all sheets from about a 100 file to a new sheet of a book and save the file [email protected] Setting up and Configuration of Excel 0 March 14th 07 02:13 AM
Open and copy all workbook sheets in a folder to a master file [email protected] Excel Discussion (Misc queries) 0 November 2nd 06 04:29 PM
copy sheets to another file Gareth[_3_] Excel Programming 2 October 18th 03 05:37 PM


All times are GMT +1. The time now is 02:22 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"