ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Set Tab to specific textbox control (https://www.excelbanter.com/excel-programming/277760-set-tab-specific-textbox-control.html)

mandy_less[_3_]

Set Tab to specific textbox control
 
Hi all,

Would anyone kindly point out how to set the tab control to a specific
textbox in a form?

Thanks in advance...



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/


Robin Hammond

Set Tab to specific textbox control
 
Mandy,

I'm guessing you mean how do you control the tab order in a form.

Select the textbox, under properties, set tabstop to TRUE, set the TabIndex
to the order in which you want the textbox to be tabbed to. Set tabstop to
false for things you don't want to tab to. Set Default to true for your OK
button, Cancel to true for you cancel button.

Robin Hammond
www.enhanceddatasystems.com
Check out our XspandXL add-in


"mandy_less" wrote in message
...
Hi all,

Would anyone kindly point out how to set the tab control to a specific
textbox in a form?

Thanks in advance...



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/




mandy_less[_4_]

Set Tab to specific textbox control
 
Hi again,

I have set the TabOrder, the TabStop of a specific textbox to True and
the rest of the textboxes to False. However, after displaying some
results, the tab still returns to the previous textbox.

For example, suppose that I want the tab to stop at textbox2. After
populating the results in textbox1, the tab returns to textbox1 even
though * UserForm.textbox1.TabStop = False * and *
UserForm.textbox2.TabStop = True *

Can anyone please advice?

Thanks yah!!! (",)



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/


mandy_less[_5_]

Set Tab to specific textbox control
 
Hi,

In case u guys have the problem...
I have found a solution that I want to share...

UserForm.TextBox.Enabled = True
UserForm.TextBox.SetFocus

That shld solve the prob!!!

Cheerios...



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/



All times are GMT +1. The time now is 04:20 AM.

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