M
murphyz
I want to be able to create a copy of an existing sheet and have the
user specify the sheet name as it copies, rather than wait until they
have copied it and then change the name manually. Ideally, after
clicking the command button to copy the name, the user will be prompted
to type in the sheet name.
The code I have for creating the copy is as follows (taken straight
from a macro), and it's the .Name = "domain.com" section I need to be
able to specify.
Private Sub CommandButton1_Click()
Sheets("Template.com").Select
Sheets("Template.com").Copy After:=Sheets(2)
Sheets("Template.com (2)").Select
Sheets("Template.com (2)").Name = "domain.com"
End Sub
Any advice greatly appreciated, thanks.
Mxx
user specify the sheet name as it copies, rather than wait until they
have copied it and then change the name manually. Ideally, after
clicking the command button to copy the name, the user will be prompted
to type in the sheet name.
The code I have for creating the copy is as follows (taken straight
from a macro), and it's the .Name = "domain.com" section I need to be
able to specify.
Private Sub CommandButton1_Click()
Sheets("Template.com").Select
Sheets("Template.com").Copy After:=Sheets(2)
Sheets("Template.com (2)").Select
Sheets("Template.com (2)").Name = "domain.com"
End Sub
Any advice greatly appreciated, thanks.
Mxx