Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,814
Default Macro to copy existing sheet to end

I am creating a macro to make several copies of a particular worksheet and
move each succeeding one to the end (a choice when doing it manually).
However the macro recorder shows this
Sheets("1").Copy After:=Sheets(8)
How can I generically make the "After:=Sheets(8)" into "After:=End"?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,069
Default Macro to copy existing sheet to end

try this.

Sheets(1).Copy After:=Worksheets(Worksheets.Count)
--
jb


"Steve" wrote:

I am creating a macro to make several copies of a particular worksheet and
move each succeeding one to the end (a choice when doing it manually).
However the macro recorder shows this
Sheets("1").Copy After:=Sheets(8)
How can I generically make the "After:=Sheets(8)" into "After:=End"?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,565
Default Macro to copy existing sheet to end

Just in case there are chart or template sheets:

Sheets(1).Copy After:=Sheets(Sheets.Count)



"john" wrote in message
...
try this.

Sheets(1).Copy After:=Worksheets(Worksheets.Count)
--
jb


"Steve" wrote:

I am creating a macro to make several copies of a particular worksheet
and
move each succeeding one to the end (a choice when doing it manually).
However the macro recorder shows this
Sheets("1").Copy After:=Sheets(8)
How can I generically make the "After:=Sheets(8)" into "After:=End"?



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
Macro to copy and paste over existing files Cam Excel Discussion (Misc queries) 1 July 1st 09 08:37 PM
Copy rows onto existing sheet / start a new sheet if full mg_sv_r Excel Programming 0 November 29th 07 12:57 PM
Macro to create a new worksheet that is a copy of an existing one? Kai Cunningham[_2_] Excel Programming 3 July 3rd 07 02:30 AM
macro/sub to copy a specific ws from source wb to open wb and overwrite existing ws nycjdc Excel Programming 3 December 4th 06 10:54 PM
Copy the entire sheet to overlay existing sheet? LurfysMa New Users to Excel 2 August 29th 05 07:05 PM


All times are GMT +1. The time now is 04:44 PM.

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"