Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I was given this code to copy a worksheet to another:
Activesheet.copy After:=ActiveSheet How do I give the new worksheet a name rather than it using the same name with a number in parentheses after it? - David |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
David,
The new sheet is the active sheet after a Copy operation, so you can use ActiveSheet. E.g., ActiveSheet.Name = "NewName" -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "David" wrote in message ... I was given this code to copy a worksheet to another: Activesheet.copy After:=ActiveSheet How do I give the new worksheet a name rather than it using the same name with a number in parentheses after it? - David |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi David
Name it "Harald". Great norwegian name, done like this: Sub test() On Error Resume Next ActiveSheet.Copy After:=ActiveSheet ActiveSheet.Name = "Harald" End Sub -yes, it's a separate operation. I think it has to be that way. -- HTH. Best wishes Harald Excel MVP Followup to newsgroup only please. "David" wrote in message ... I was given this code to copy a worksheet to another: Activesheet.copy After:=ActiveSheet How do I give the new worksheet a name rather than it using the same name with a number in parentheses after it? - David |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Getting a value from another worksheet, in a copied cell? | Excel Worksheet Functions | |||
Can data be copied from one worksheet to another? | Excel Worksheet Functions | |||
how do i restore a copied over worksheet | Excel Worksheet Functions | |||
Copied worksheet not working | Excel Discussion (Misc queries) | |||
How to protect a worksheet from being copied to another worksheet | Excel Discussion (Misc queries) |