Create a new worksheet based on and input box

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
 
J

Jacob Skaria

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
 
M

Mustang

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
 
W

woodyratm

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top