Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I have a large spreadsheet and I am trying to add a macro that allows me to
add a worksheet AND have an input box pop up so I can name the worksheet whatever name I need it to be. Is this possible? |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
VERY QUICK & VERY DIRTY
Sub newsheet() Dim ws As Worksheet Dim nm As String Set ws = Worksheets.Add ws.Name = InputBox("sheet name") End Sub "WBTKbeezy" wrote: I have a large spreadsheet and I am trying to add a macro that allows me to add a worksheet AND have an input box pop up so I can name the worksheet whatever name I need it to be. Is this possible? |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
That is perfect, quick and dirty can work sometimes...
Now is there a way to put it in a sepecific place in the workbook? "Duke Carey" wrote: VERY QUICK & VERY DIRTY Sub newsheet() Dim ws As Worksheet Dim nm As String Set ws = Worksheets.Add ws.Name = InputBox("sheet name") End Sub "WBTKbeezy" wrote: I have a large spreadsheet and I am trying to add a macro that allows me to add a worksheet AND have an input box pop up so I can name the worksheet whatever name I need it to be. Is this possible? |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Yup. The .Add method takes optional parameters of Before and/or After, so
you can specify where. In this case it is BEFORE sheet1 Sub newsheet() Dim ws As Worksheet Dim nm As String Set ws = Worksheets.Add(befo=Worksheets("Sheet1")) ws.Name = InputBox("sheet name") End Sub "WBTKbeezy" wrote: That is perfect, quick and dirty can work sometimes... Now is there a way to put it in a sepecific place in the workbook? "Duke Carey" wrote: VERY QUICK & VERY DIRTY Sub newsheet() Dim ws As Worksheet Dim nm As String Set ws = Worksheets.Add ws.Name = InputBox("sheet name") End Sub "WBTKbeezy" wrote: I have a large spreadsheet and I am trying to add a macro that allows me to add a worksheet AND have an input box pop up so I can name the worksheet whatever name I need it to be. Is this possible? |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Okay getting there... but now is there a way to have an input box for what
sheet you would like it before? "Duke Carey" wrote: Yup. The .Add method takes optional parameters of Before and/or After, so you can specify where. In this case it is BEFORE sheet1 Sub newsheet() Dim ws As Worksheet Dim nm As String Set ws = Worksheets.Add(befo=Worksheets("Sheet1")) ws.Name = InputBox("sheet name") End Sub "WBTKbeezy" wrote: That is perfect, quick and dirty can work sometimes... Now is there a way to put it in a sepecific place in the workbook? "Duke Carey" wrote: VERY QUICK & VERY DIRTY Sub newsheet() Dim ws As Worksheet Dim nm As String Set ws = Worksheets.Add ws.Name = InputBox("sheet name") End Sub "WBTKbeezy" wrote: I have a large spreadsheet and I am trying to add a macro that allows me to add a worksheet AND have an input box pop up so I can name the worksheet whatever name I need it to be. Is this possible? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Using this Automatic Resizing Macro with Worksheet Change | Excel Discussion (Misc queries) | |||
Formulas not recalculating when values change on another sheet | Excel Worksheet Functions | |||
change sheet tab color? | Excel Discussion (Misc queries) | |||
Copy cell format to cell on another worksht and update automatical | Excel Worksheet Functions | |||
How do I change macro text with another macro? | Excel Discussion (Misc queries) |