Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Using Combo Boxes as a function
Hi,
I want to have a list in my combo box that once selected it will then on a new sheet name the sheet tab as selected from my combo box. so if in my combo box i had: monday tuesday Wednesday I want to select tuesday and on another sheet it renames the sheet tab with tuesday. Thanks, Jez. |
#2
|
|||
|
|||
Try something like:
Private Sub ComboBox1_Change() Dim NewSh As Worksheet Dim ComboBoxVal As String ComboBoxVal = ComboBox1.Value Set NewSh = Sheets.Add On Error GoTo InvalidName NewSh.Name = ComboBoxVal Exit Sub InvalidName: MsgBox "Invalid name or workhseet with " & _ "the same name already exists." Application.DisplayAlerts = False NewSh.Delete Application.DisplayAlerts = True End Sub --- HTH Jason Atlanta, GA "Jez" wrote: Hi, I want to have a list in my combo box that once selected it will then on a new sheet name the sheet tab as selected from my combo box. so if in my combo box i had: monday tuesday Wednesday I want to select tuesday and on another sheet it renames the sheet tab with tuesday. Thanks, Jez. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Emulate Index/Match combo function w/ VBA custom function | Excel Worksheet Functions | |||
connecting combo boxes to yield data in another cell. | Excel Discussion (Misc queries) | |||
2 combo boxes | Excel Worksheet Functions | |||
dynamic combo boxes | Excel Worksheet Functions | |||
How do I autofill combo boxes with their destination cell? | Excel Worksheet Functions |