Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to re-set focus to the text box after deleting invalid data?
Hello:
I would appreciate help with the following: I have a user form with text box. If the user enters an invalid data into the text box, I display a message box stating "DATE ENTERED IS INVALID. PLEASE RE-ENTER" When the user clicks OK, the invalid data gets deleted using: txtbox1.value ="" I then want the same textbox (txtbox1) to get focus so that the user can re-enter data. However, I notice that the cursor moves to the NEXT text box (eg txtbox2) I have tried using the code txtbox1.setfocus" OR txtbox1.SelStart = 0 However, none seems to work. I am obviously missing something simple. Would really appreciate your help TIA Vinay |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
ADDING/DELETING SHEET Without losing focus? | Excel Discussion (Misc queries) | |||
Text Box has the focus | Excel Programming | |||
Text Box Focus | Excel Programming | |||
Deleting Invalid Links | Excel Programming | |||
Text Box Set Focus Issue | Excel Programming |