Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Renaming newly added worksheets
Hello. I have a button that copies an existing worksheet and names it
"New Csutomer". The problem is when the user pushes the button twice the code errors out because there is already a sheet named "New Customer". Is there a way to append a number to the new sheets so this does not happen? Thanks!! Private Sub CommandButton2_Click() 'Add new Customer Calc Sheets Sheets("Customer Number").Copy Befo=Sheets(3) ActiveSheet.Name = "New Customer" End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how do i get the name of a newly added sheet that i add with Sheets.Add in a vba macro in excel? | Excel Worksheet Functions | |||
Naming a newly added sheet | Excel Programming | |||
Naming a newly added sheet | Excel Programming | |||
Neet to get range of newly added QueryTable | Excel Programming | |||
Add Hyperlink to newly added worksheet? | Excel Programming |