Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
cursor position | Excel Discussion (Misc queries) | |||
Cursor position | Excel Discussion (Misc queries) | |||
Cursor position? | Excel Discussion (Misc queries) | |||
cursor position | Excel Programming | |||
cursor position | Excel Programming |