Here is the solution to the Macro Monday Challenge for creating a form that will change the sheet name

‘Module Code
Sub SheetSub()


End Sub

‘User Form Code

Private Sub ComboBox1_Change()
‘ nme = ComboBox1
‘ Sheets(nme).Select
‘ Unload Me

End Sub

Private Sub CommandButton1_Click()

On Error GoTo errHandle:
nme = ComboBox1
Sheets(nme).Name = Me.TextBox1

Unload Me

Exit Sub
MsgBox “Please Enter Another Sheet Name”
Me.TextBox1 = “”

End Sub

Private Sub UserForm_Initialize()
For Each ws In Worksheets
ComboBox1.AddItem ws.Name

End Sub

Chris Terrell

View all posts