ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Create a new worksheet based on and input box (https://www.excelbanter.com/excel-programming/427543-create-new-worksheet-based-input-box.html)

Mustang

Create a new worksheet based on and input box
 
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

Jacob Skaria

Create a new worksheet based on and input box
 
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
---------------
Jacob Skaria


"Mustang" wrote:

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


Mustang

Create a new worksheet based on and input box
 
Thank you so much, it works perfectly.

"Jacob Skaria" wrote:

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
---------------
Jacob Skaria


"Mustang" wrote:

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


woodyratm

Create a new worksheet based on and input box
 
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.

"Mustang" wrote:

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



All times are GMT +1. The time now is 12:18 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com