C
corky_guy
Hi -
I'm trying to error check on a specific range of numbers but I can't
get it to work. I need to prevent user from inputting any numeric
value from 65000 - 65999. The code I'm using seems to only error
check a single digit (either 6, 5, 0, or 9) instead of looking at the
whole number.
Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
With Me.TextBox1
If (.Text) Like "[65000 - 65999]" Then
MsgBox "Please use the proper range of numbers!"
Cancel = True
End If
End With
End Sub
I'm sure it's something easy, I just don't know how to fix.
Thanks for your help!
I'm trying to error check on a specific range of numbers but I can't
get it to work. I need to prevent user from inputting any numeric
value from 65000 - 65999. The code I'm using seems to only error
check a single digit (either 6, 5, 0, or 9) instead of looking at the
whole number.
Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
With Me.TextBox1
If (.Text) Like "[65000 - 65999]" Then
MsgBox "Please use the proper range of numbers!"
Cancel = True
End If
End With
End Sub
I'm sure it's something easy, I just don't know how to fix.
Thanks for your help!