Hello,
I currently have the following:
Private Sub TextBox9_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If TextBox9.Value Like "*[!0-9]*" Then
MsgBox "You must provide a numeric value in this TextBox!"
Cancel = True
ElseIf TextBox9.Value > 2 Then
MsgBox "Invalid Pick!"
Cancel = True
ElseIf TextBox9.Value < 1 Then
MsgBox "Invalid Pick!"
Cancel = True
End If
End Sub
I would like to add to this that the only other accepted value would be 999. So only values entered can be 1, 2, or 999.
Appreciate any help.
Thanks,
DC
I currently have the following:
Private Sub TextBox9_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If TextBox9.Value Like "*[!0-9]*" Then
MsgBox "You must provide a numeric value in this TextBox!"
Cancel = True
ElseIf TextBox9.Value > 2 Then
MsgBox "Invalid Pick!"
Cancel = True
ElseIf TextBox9.Value < 1 Then
MsgBox "Invalid Pick!"
Cancel = True
End If
End Sub
I would like to add to this that the only other accepted value would be 999. So only values entered can be 1, 2, or 999.
Appreciate any help.
Thanks,
DC