Until he done so, all the other controls are disabled, and he cannot exit the text box.
In this example, the user will not be able to exit the first Text Box, until he type "abc".
To check this code, try to press the button or enter to the second text box.
Preparations
Add 1 Command Button and two Text Boxes to your form.
Form Code
Private Sub Text1_Validate(Cancel As Boolean)
Cancel = Text1.Text <> "abc"
End Sub
0 comments:
Post a Comment