Textbox exit problem
Posted by Beginner Bob on November 15, 2001 12:30 PM
Can somebody help me with the textbox_exit routine?
Here's my current code:
Private Sub TextBox6_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If TextBox6.Value = "" Then
MsgBox "A LOCATION MUST BE ENTERED."
How do I bypass this if the Cancel button (which unloads the userform) is pressed? I want to insure that the user inputs something into textbox6 unless they want to cancel out of the form. Currently, the message box comes up even if cancel is pressed. In addition, I want to make sure that the focus goes back into textbox6 if tab is pressed etc. when it's left blank. Thanks for any help in advance.