|
-
Feb 10th, 2005, 09:31 AM
#1
Thread Starter
Member
Help with Focus/Lost Focus
Here is the code another member gave me.
Private Sub TextBox1_Change()
If Val(TextBox1.Text) < 1 Or Val(TextBox1.Text) > 5 Then
MsgBox "Please enter a number between 1 and 5".
TextBox1.SetFocus
End If
End Sub
That works fine, it limits users from entering values less than one and greater than 5 but if the user simply presses enter or tab the box remains blank.
I have tried several ways to capture this event. Is this a problem with the AutoTab feature?
Thanks.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|