Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 181
Default user form start field

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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,510
Default user form start field

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.

--
Regards,

OssieMac


"Alberto Ast" wrote:

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.

  #3   Report Post  
Posted to microsoft.public.excel.programming
om om is offline
external usenet poster
 
Posts: 18
Default user form start field

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
"Alberto Ast" wrote:

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.

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
Date field in user form & Loading a user form on opening workbook Balan Excel Programming 1 May 24th 08 03:40 PM
user form, field split??? Rominall Excel Programming 1 November 19th 07 03:12 PM
How do I get User Form to run at start up? Bafa[_15_] Excel Programming 2 August 21st 06 11:48 AM
Place a User Form on Start Up SamuelT[_24_] Excel Programming 2 June 16th 06 12:20 PM
User form with looping doesn't start at right place. Rominall Excel Programming 2 February 14th 06 07:36 PM


All times are GMT +1. The time now is 01:30 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"