user form start field

A

Alberto Ast

I have a user form with several text boxes but when I start executing the
form the cursor starts in the wrong text box... how do I change to the place
I want it to start....?

It start on textbox2 but I need it on textbox 1...
I have a second form and it does start on text box 1 but I do not know how
to control this.
 
O

OssieMac

In the Userform design mode, right click the text box and select properties.

You will find 3 properties. Tab Index, TabKeyBehaviour and TabStop

TabIndex starts at zero for the first stop. Set the Numeric 0 to 2 for each
of the 3 textboxes in the required order.

TabKeyBehaviour = False. Tab advances to next control.
TabKeyBehaviour = True. Tabs within the control. (Use Enter to advance to
next control)

TabStop = True. Cursor will stop in the control with Tab or Enter.
TabStop = False. Cursor will skip the control with Tab or Enter but you
can still select the control with the mouse.
 
O

om

Hi Alberto

you can add setfocus property to the textbox where you want the cursor on
form load event. For example you want cursor on textbox1 in Userform1

Userform_initialize()
Userform1.textBox1.SetFocus
End Sub

Regards
Om
 
A

Alberto Ast

Thanks, system was going to slow so I thought my first question did not went
thru... got both answered.. great help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top