#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Focus

I have a textbox for putting in Employee ID. The moment I enter the
employee ID and tab out of the control, there is a validation being
done. If it is an invalid ID, I get the message box but the curor moves
to the next control. How can I take it back?

If Len(aEmpID.Value) < 5 Or Not IsNumeric(aEmpID.Value) Or check =
False Then
MsgBox "Incorrect Employee ID"
aEmpID = Empty
aEmpID.SetFocus
End If

SetFocus is not working for me. Is there any other syntax?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
focus Capp Excel Discussion (Misc queries) 2 November 18th 05 07:25 PM
RTD Getting The Focus James Dunkerley Excel Programming 1 December 2nd 04 06:57 PM
Focus Roy Miller[_3_] Excel Programming 2 August 6th 04 12:30 AM
focus Art[_6_] Excel Programming 1 June 7th 04 05:53 PM
set focus RickK Excel Programming 1 October 10th 03 12:27 PM


All times are GMT +1. The time now is 01:56 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"