Hello,
I currently have:
Private Sub TextBox3_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If TextBox3.Value Like "*[!0-9]*" Then
MsgBox "You must provide a numeric value in this TextBox!"
Cancel = True
ElseIf TextBox3.Value > 26 Then
MsgBox "Invalid Pick!"
Cancel = True
ElseIf TextBox3.Value < 1 Then
MsgBox "Invalid Pick!"
Cancel = True
End If
End Sub
Private Sub TextBox4_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If TextBox4.Value Like "*[!0-9]*" Then
MsgBox "You must provide a numeric value in this TextBox!"
Cancel = True
ElseIf TextBox4.Value > 26 Then
MsgBox "Invalid Pick!"
Cancel = True
ElseIf TextBox4.Value < 1 Then
MsgBox "Invalid Pick!"
Cancel = True
End If
End Sub
The Invalid Pick message pops up, once clicked I am getting a error message: run-time error - unspecified error, forcing to close the form and reopen.
I appreciate any help.
Thanks,
DC
I currently have:
Private Sub TextBox3_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If TextBox3.Value Like "*[!0-9]*" Then
MsgBox "You must provide a numeric value in this TextBox!"
Cancel = True
ElseIf TextBox3.Value > 26 Then
MsgBox "Invalid Pick!"
Cancel = True
ElseIf TextBox3.Value < 1 Then
MsgBox "Invalid Pick!"
Cancel = True
End If
End Sub
Private Sub TextBox4_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If TextBox4.Value Like "*[!0-9]*" Then
MsgBox "You must provide a numeric value in this TextBox!"
Cancel = True
ElseIf TextBox4.Value > 26 Then
MsgBox "Invalid Pick!"
Cancel = True
ElseIf TextBox4.Value < 1 Then
MsgBox "Invalid Pick!"
Cancel = True
End If
End Sub
The Invalid Pick message pops up, once clicked I am getting a error message: run-time error - unspecified error, forcing to close the form and reopen.
I appreciate any help.
Thanks,
DC