Create a new worksheet based on and input box

  • Thread starter Thread starter Mustang
  • Start date Start date
M

Mustang

I am hoping someone can help me out. I would like to create a macro to
achieve the following but not sure how to go about it:

Create a command button which will create an input box which asks the user
to type in a new job number (these are layed out as 12-3456), then the master
job sheet (call it Master Job) is copied and the tab is named with the job
number typed into the input box.

Many thanks in advance
 
Sub InsertSheet()
Dim strSheetName as String

strSheetName = InputBox("Enter Job Number")
Sheets("Master Job").Copy After:=Sheets(Sheets.Count)
Sheets(Sheets.Count).Name = strSheetName

End Sub

If this post helps click Yes
 
Thank you so much, it works perfectly.

Jacob Skaria said:
Sub InsertSheet()
Dim strSheetName as String

strSheetName = InputBox("Enter Job Number")
Sheets("Master Job").Copy After:=Sheets(Sheets.Count)
Sheets(Sheets.Count).Name = strSheetName

End Sub

If this post helps click Yes
 
Hello,
I have a problem like this. Except i want to be able to create a new sheet
that will contain new data but increment certain data eg day 1 > day 2 etc. I
also need to be able to continue calculations.

Any help would be appriciated (sp?)

thanks.
 
Back
Top