ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Form Question (https://www.excelbanter.com/excel-programming/377426-form-question.html)

Barb Reinhardt

Form Question
 
I have a userform with a combo box and a text box. When the userform is
invoked, the cursor defaults to the text box. How do I get it to be on the
combo box (if it ever is on the combo box). It just looks strange to the
user because the cursor is on the entry that they make second.

Thanks

Tom Ogilvy

Form Question
 
Manually in the VBE set the tabindex property of the combobox to 0

--
Regards,
Tom Ogilvy


"Barb Reinhardt" wrote:

I have a userform with a combo box and a text box. When the userform is
invoked, the cursor defaults to the text box. How do I get it to be on the
combo box (if it ever is on the combo box). It just looks strange to the
user because the cursor is on the entry that they make second.

Thanks


Barb Reinhardt

Form Question
 
The tab index property of the combobox is zero. I have the combo box on the
left and the text box on the right, the cursor is displayed in the text box.

"Tom Ogilvy" wrote:

Manually in the VBE set the tabindex property of the combobox to 0

--
Regards,
Tom Ogilvy


"Barb Reinhardt" wrote:

I have a userform with a combo box and a text box. When the userform is
invoked, the cursor defaults to the text box. How do I get it to be on the
combo box (if it ever is on the combo box). It just looks strange to the
user because the cursor is on the entry that they make second.

Thanks


Tom Ogilvy

Form Question
 
With these settings and no code to alter behavior

combobox1.TabIndex = 0
Combobox1.TabStop = True
Combobox1.Enabled = True
Combobox1.Locked = False

Textbox1.TabIndex = 1
Textbox1.TabStop = True
Textbox1.Enabled = True
Textbox1.Locked = False

The cursor should be in the Combobox when you first load the userform. If
the userform has been hidden and then shown again, then it would retain the
cursor in the same location as when hidden.

Location of the control on the userform has no effect on executing the tab
order.

--
Regards,
Tom Ogilvy


"Barb Reinhardt" wrote:

The tab index property of the combobox is zero. I have the combo box on the
left and the text box on the right, the cursor is displayed in the text box.

"Tom Ogilvy" wrote:

Manually in the VBE set the tabindex property of the combobox to 0

--
Regards,
Tom Ogilvy


"Barb Reinhardt" wrote:

I have a userform with a combo box and a text box. When the userform is
invoked, the cursor defaults to the text box. How do I get it to be on the
combo box (if it ever is on the combo box). It just looks strange to the
user because the cursor is on the entry that they make second.

Thanks


Barb Reinhardt

Form Question
 
Thanks, that did it. Where can I find this information documented somewhere?

"Tom Ogilvy" wrote:

With these settings and no code to alter behavior

combobox1.TabIndex = 0
Combobox1.TabStop = True
Combobox1.Enabled = True
Combobox1.Locked = False

Textbox1.TabIndex = 1
Textbox1.TabStop = True
Textbox1.Enabled = True
Textbox1.Locked = False

The cursor should be in the Combobox when you first load the userform. If
the userform has been hidden and then shown again, then it would retain the
cursor in the same location as when hidden.

Location of the control on the userform has no effect on executing the tab
order.

--
Regards,
Tom Ogilvy


"Barb Reinhardt" wrote:

The tab index property of the combobox is zero. I have the combo box on the
left and the text box on the right, the cursor is displayed in the text box.

"Tom Ogilvy" wrote:

Manually in the VBE set the tabindex property of the combobox to 0

--
Regards,
Tom Ogilvy


"Barb Reinhardt" wrote:

I have a userform with a combo box and a text box. When the userform is
invoked, the cursor defaults to the text box. How do I get it to be on the
combo box (if it ever is on the combo box). It just looks strange to the
user because the cursor is on the entry that they make second.

Thanks


Tom Ogilvy

Form Question
 
Unless you mean by reading the help file for each of the properties, I
wouldn't know of another source.

--
Regards,
Tom Ogilvy



"Barb Reinhardt" wrote:

Thanks, that did it. Where can I find this information documented somewhere?

"Tom Ogilvy" wrote:

With these settings and no code to alter behavior

combobox1.TabIndex = 0
Combobox1.TabStop = True
Combobox1.Enabled = True
Combobox1.Locked = False

Textbox1.TabIndex = 1
Textbox1.TabStop = True
Textbox1.Enabled = True
Textbox1.Locked = False

The cursor should be in the Combobox when you first load the userform. If
the userform has been hidden and then shown again, then it would retain the
cursor in the same location as when hidden.

Location of the control on the userform has no effect on executing the tab
order.

--
Regards,
Tom Ogilvy


"Barb Reinhardt" wrote:

The tab index property of the combobox is zero. I have the combo box on the
left and the text box on the right, the cursor is displayed in the text box.

"Tom Ogilvy" wrote:

Manually in the VBE set the tabindex property of the combobox to 0

--
Regards,
Tom Ogilvy


"Barb Reinhardt" wrote:

I have a userform with a combo box and a text box. When the userform is
invoked, the cursor defaults to the text box. How do I get it to be on the
combo box (if it ever is on the combo box). It just looks strange to the
user because the cursor is on the entry that they make second.

Thanks



All times are GMT +1. The time now is 06:14 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com