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.
|