princesstech
New Member
- Joined
- May 6, 2003
- Messages
- 17
Hi,
I have a form with several text boxes. At least one of those text boxes is set to validate on exit, generate an error message then return the cursor to the text box so the EU can make the correction.
Here's the code I'm using, and I can't find anything wrong with it.
What am I doing wrong? Any help would be appreciated.
TIA
Marie
I have a form with several text boxes. At least one of those text boxes is set to validate on exit, generate an error message then return the cursor to the text box so the EU can make the correction.
Here's the code I'm using, and I can't find anything wrong with it.
Code:
Private Sub TextBox2_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If TextBox2 = "" Then
MsgBox "fill it in"
TextBox2.SetFocus
End If
End Sub
What am I doing wrong? Any help would be appreciated.
TIA
Marie