Copying active sheet in a macro

  • Thread starter Thread starter David P.
  • Start date Start date
D

David P.

I want to have a macro button that copies the active
sheet. When trying to do that by recording it references
the sheet that I recorded the macro under so that if I
were to ever copy and rename a sheet that macro button
references the original sheet that the macro was created
under. Any way to have a macro copy the active sheet
(regardless of it's name)? Thank you.
 
David, where the macro recorder put the sheet name use this instead
ActiveSheet
--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 97 & 2000
** remove news from my email address to reply by email **
 
This is one way:

ActiveSheet.Copy after:=ActiveSheet
'now the copied sheet is active
activesheet.name = "Nice Unique Name"
 
Back
Top