hello all...
I have the following macro to name the sheet and it's working fine
I just need some help to force the users to select any of the optionbuttons
Any sugest pls??
I have the following macro to name the sheet and it's working fine
Code:
Private Sub CommandButton2_Click()
Dim X As Variant
If OptionButton1.Value = True Then
X = "1"
ElseIf OptionButton2.Value = True Then
X = "2"
ElseIf OptionButton3.Value = True Then
X = "3"
ElseIf OptionButton4.Value = True Then
X = "4"
ElseIf OptionButton5.Value = True Then
X = "5"
ElseIf OptionButton6.Value = True Then
X = "6"
End If
If TextBox1 = "" Then
MsgBox "Insert Name"
Exit Sub
End If
Sheets(Sheets.Count).Name = TextBox1 & " " & X & " " & Date
Unload Me
End Sub
I just need some help to force the users to select any of the optionbuttons
Any sugest pls??