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: 86
Default SetFocus back to textbox after exiting

Hi

I'm trying to set focus back to a textbox after exiting the textbox, if the
condition isn't met.

I found a similar example in an earlier thread by jimec74, titled "Using
SetFocus with Frames", which was said to work. But when I tested it myself in
Excel 2003, the SetFocus doesn't seem to fire (i.e. focus still jumps to the
next textbox). Is this just me?


Sub Txt_StartValue_Exit(ByVal Cancel As MSForms.ReturnBoolean)

Dim Msg, Title, Response

If IsNumeric(Txt_StartValue.Value) = False Then
Msg = "You must enter a number"
Title = "Non-numeric Value"
Response = MsgBox(Msg,16,Title)
Txt_StartValue.SetFocus
End If

End Sub

 
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
How do you SETFOCUS on TextBox Mike[_113_] Excel Programming 3 December 11th 06 02:00 AM
Having problems with textbox setfocus Terry K Excel Programming 1 May 9th 06 02:23 PM
setfocus in textbox on multipage Martin Excel Programming 5 January 6th 06 04:20 AM
TextBox SetFocus Problem Tom Ogilvy Excel Programming 1 September 12th 03 01:27 PM
TextBox.SetFocus steve Excel Programming 4 July 16th 03 07:40 PM


All times are GMT +1. The time now is 07:32 AM.

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

About Us

"It's about Microsoft Excel"