Remember Me?
Menu
Home
Search
Today's Posts
Home
Search
Today's Posts
ExcelBanter
»
Excel Newsgroups
»
Excel Programming
>
Focus
Reply
LinkBack
Thread Tools
Search this Thread
Display Modes
#
1
Posted to microsoft.public.excel.programming
[email protected]
external usenet poster
Posts: 16
Focus
I had it in the AfterUpdate event but now I have changed it to Exit
even and your Cancel=True is working fine
Thank you
wrote:
Assuming that this code is in an Exit event procedu
Cancel = True ''replace aEmpID.SetFocus with this
Regards,
Steve
www.stkomp.com
wrote:
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 With Quote
Reply
Thread Tools
Search this Thread
Show Printable Version
Search this Thread
:
Advanced Search
Display Modes
Switch to Linear Mode
Hybrid Mode
Switch to Threaded Mode
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
08:49 PM
.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
Contact Us
ExcelBanter forum home
Privacy Statement
LinkBack
LinkBack URL
About LinkBacks