Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Sub Button1_Click()
inset = Range("B3").Value Sheets.Add ActiveSheet.Name = "inset" On Error GoTo Dele Sheets("sdfs").Select Range("A2").Select Dele: ActiveSheet.Delete End Sub I'm wanting this button to make a new sheet within the workbook, named as whatever is in B3 on the same sheet as the button. I only want it to do this if this sheet does not already exist. Its for recording productivity, and each sheet will be a person, and I want part of the code to make a new sheet if that person doesn't already have a sheet, new staff etc. |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
try this idea from a recent post of mine
Sub mynewsheets() For Each c In Range("myrange") On Error Resume Next If Sheets.Name < c Then Sheets.Add.Name = c End If Next c End Sub -- Don Guillett SalesAid Software "PaulW" wrote in message ... Sub Button1_Click() inset = Range("B3").Value Sheets.Add ActiveSheet.Name = "inset" On Error GoTo Dele Sheets("sdfs").Select Range("A2").Select Dele: ActiveSheet.Delete End Sub I'm wanting this button to make a new sheet within the workbook, named as whatever is in B3 on the same sheet as the button. I only want it to do this if this sheet does not already exist. Its for recording productivity, and each sheet will be a person, and I want part of the code to make a new sheet if that person doesn't already have a sheet, new staff etc. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Lookup function and compare | Excel Discussion (Misc queries) | |||
How can i make link to different sheet | Links and Linking in Excel | |||
how do I make different col widths within same col. on same sheet | Charts and Charting in Excel | |||
In Excel, how do you make one whole sheet equal to another. | Excel Discussion (Misc queries) | |||
How do I make excel startup in a specific sheet? | Excel Worksheet Functions |