C
corky_guy
Trying to limit the entry of text to a string like this:
1234:BUNCH_OF_NUMBERS
The critical part is: 1234: cannot be changed (i.e., will always be
four numbers with a colon)
Everything after the colon can only be numbers but no limitation in
length (and numbers only)
Private Sub TextBox2_Exit(ByVal Cancel As MSForms.ReturnBoolean)
With Me.TextBox2
If Not .Text Is "[1][2][3][4][:]" And [0 - 9] Then
MsgBox "Please do something"
Cancel = True
End If
End With
End Sub
But, it's not working! I've tried a million different combinations of
strings w/ and w/out quotes, brackets, etc!
Anyone?
1234:BUNCH_OF_NUMBERS
The critical part is: 1234: cannot be changed (i.e., will always be
four numbers with a colon)
Everything after the colon can only be numbers but no limitation in
length (and numbers only)
Private Sub TextBox2_Exit(ByVal Cancel As MSForms.ReturnBoolean)
With Me.TextBox2
If Not .Text Is "[1][2][3][4][:]" And [0 - 9] Then
MsgBox "Please do something"
Cancel = True
End If
End With
End Sub
But, it's not working! I've tried a million different combinations of
strings w/ and w/out quotes, brackets, etc!
Anyone?