![]() |
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"? |
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"? |
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"? |
All times are GMT +1. The time now is 09:02 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com