![]() |
userform setfocus question
is there any way to get the cursor in a certain text box? when i leave a textbox
and the entry isn't valid, i would like to get the cursor back in that textbox. setfocus only seems to work when the form is activated. -- Gary |
userform setfocus question
Gary ,
Do you open another userform when leaving the textbox? If not , your userform will remain active as your controls on this userform. so , textbox1.setfocus should do the trick when the entry is invalid. otherwise , post a little of your code , so we can check what's wrong. MarMo "Gary Keramidas" <GKeramidasATmsn.com wrote in message ... is there any way to get the cursor in a certain text box? when i leave a textbox and the entry isn't valid, i would like to get the cursor back in that textbox. setfocus only seems to work when the form is activated. -- Gary |
userform setfocus question
Private Sub CommandButton2_Click() Me.TextBox1.Value = "" Me.TextBox2.Value = "" Me.TextBox3.Value = "" Me.TextBox2.SetFocus End Sub -- Gary "MarMo" wrote in message ... Gary , Do you open another userform when leaving the textbox? If not , your userform will remain active as your controls on this userform. so , textbox1.setfocus should do the trick when the entry is invalid. otherwise , post a little of your code , so we can check what's wrong. MarMo "Gary Keramidas" <GKeramidasATmsn.com wrote in message ... is there any way to get the cursor in a certain text box? when i leave a textbox and the entry isn't valid, i would like to get the cursor back in that textbox. setfocus only seems to work when the form is activated. -- Gary |
userform setfocus question
does anybody know of a way to do this?
-- Gary "Gary Keramidas" <GKeramidasATmsn.com wrote in message ... is there any way to get the cursor in a certain text box? when i leave a textbox and the entry isn't valid, i would like to get the cursor back in that textbox. setfocus only seems to work when the form is activated. -- Gary |
All times are GMT +1. The time now is 11:27 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com