Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 71
Default Qn: Position of Cursor in UserForm1

Hello Everyone,

I have constructed a UserForm1 with a bunch of different TextBoxes. Now, I
have it incorporated with ERROR MsgBoxes if I exceed a paramter. Now, Lets
say that I input all my data into the TextBoxes, I hit "OK" and a MsgBox
comes up saying, "You Must Enter The Fuel Burn For The Flight!".

If TextBoxFB = "" Then MsgBox "You Must Enter The Fuel Burn For The
Flight!": Exit Sub

OK.. this works fine, I hit the "OK" button on the MsgBox and I am back at
my UserForm1. NOW, the question of the day is: How do I make it so when I
hit the "OK" button on the MsgBox, it goes back to the UserForm1 with the
CURSOR blinking in the TextBox that gave me the error (TextBoxFB)???
Thanks in Advance.. mv


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default Position of Cursor in UserForm1

TextBoxFB.SetFocus
immediately before Exit Sub

HTH. Best wishes Harald

"Michael Vaughan" skrev i melding
...
Hello Everyone,

I have constructed a UserForm1 with a bunch of different TextBoxes. Now,

I
have it incorporated with ERROR MsgBoxes if I exceed a paramter. Now,

Lets
say that I input all my data into the TextBoxes, I hit "OK" and a MsgBox
comes up saying, "You Must Enter The Fuel Burn For The Flight!".

If TextBoxFB = "" Then MsgBox "You Must Enter The Fuel Burn For The
Flight!": Exit Sub

OK.. this works fine, I hit the "OK" button on the MsgBox and I am back at
my UserForm1. NOW, the question of the day is: How do I make it so when

I
hit the "OK" button on the MsgBox, it goes back to the UserForm1 with the
CURSOR blinking in the TextBox that gave me the error (TextBoxFB)???
Thanks in Advance.. mv




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
cursor position MarkT Excel Discussion (Misc queries) 5 February 7th 07 01:25 PM
Cursor position saziz Excel Discussion (Misc queries) 2 August 9th 05 08:19 PM
Cursor position? Marc Excel Discussion (Misc queries) 1 March 27th 05 07:09 PM
cursor position Fan Fan Excel Programming 3 August 14th 04 01:12 AM
cursor position NTL Excel Programming 1 January 18th 04 08:23 PM


All times are GMT +1. The time now is 02:41 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"