LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Copy & rename a sheet appending 01,02,03 ..etc

I would like a macro to copy the current sheet with appending 01, 02 etc
after it and so on.

Example:

If the current Worksheet was called "WeekA" if I ran the macro 4 times I
would result the following worksheets.

WeekA (current)
WeekA01
WeekA02
WeekA03
WeekA04

If I then exited the Document and opened it again and ran the macro on
"WeekA" worksheet again it would create "WeekA05"

Not a VBA man - only got this far:-

Sub CopyRen()
Dim shtName As String
shtName = ActiveSheet.Name
ActiveSheet.Copy after:=ActiveSheet
ActiveSheet.Name = shtName & "01"
Sheets(shtName).Activate
End Sub


Thanks
John


 
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
How to copy a sheet and rename it with the value of two cells from the source sheet? Simon Lloyd[_717_] Excel Programming 0 May 12th 06 01:31 AM
Copy/Rename a sheet DK Links and Linking in Excel 1 March 20th 06 05:36 AM
Button to copy sheet, rename sheet sequencially. foxgguy2005[_3_] Excel Programming 9 June 17th 05 01:41 PM
Copy a sheet and rename it quartz[_2_] Excel Programming 4 March 24th 05 09:36 PM
copy Sheet and rename it! John Smith[_9_] Excel Programming 3 September 7th 04 06:23 PM


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

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

About Us

"It's about Microsoft Excel"