LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Afterupdate problem with setfocus on a txtbox in a form

I'm using after update to check to see if a date function is correct. If I
click away inside another txtbox (say txtB) and the test on the previous
txtbox (txtA) failed the txtA.setfocus doesn't work (if you step through it
sets the focus back to txtA but then goes to txtB when the macro finishes)

Private Sub txtA_AfterUpdate()
'test to see if correct date
If checkDate(txtA.value) = false Then
Msgbox "Wrong date"
txtA.SetFocus
End If
End Sub

Any ideas?

Many thanks

James


 
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
Form, SetFocus and AfterUpdate issue Piers 2k Excel Programming 2 November 8th 05 01:52 PM
looking for a way to make a form Txtbox only visable on Mondays andywalker[_3_] Excel Programming 3 June 25th 05 06:21 PM
txtbox problem [email protected] Excel Programming 0 May 18th 05 05:11 PM
Validateing a txtbox from form Lou Excel Programming 1 April 28th 04 07:25 PM
SetFocus in user form John Tjia Excel Programming 6 February 2nd 04 03:05 PM


All times are GMT +1. The time now is 05:09 PM.

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"