ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   UserForm Tab Order (https://www.excelbanter.com/excel-programming/335225-userform-tab-order.html)

PokerZan

UserForm Tab Order
 

Hello,

I have created a UserForm that over time I have had to add and move
around aspects of in order to complete the project.

Now my problem is that becuase I added to, took away, and moved fields
from the form as time progressed, the tab sequence is a "little off"
(big understatement). What is the process I need to use to alter the
tab order within VBA so that when the form is tabbed through that it
will go in the sequence that I desire.

Thank you in advance,

PZan


--
PokerZan
------------------------------------------------------------------------
PokerZan's Profile: http://www.excelforum.com/member.php...o&userid=23480
View this thread: http://www.excelforum.com/showthread...hreadid=389214


Bob Phillips[_6_]

UserForm Tab Order
 
You could set the taborder in the userform initialize event, never need to
worry again

Private Sub Userform_Initialize()
With Me
.txtName.TabIndex = 1
.txtAddress.TabIndex = 2
.txtCity.TabIndex = 3
.txtState.TabIndex = 4
.txtZip.TabIndex = 5
.cmdOK.TabIndex = 6
.cmdCancel1.TabIndex = 7
End With
End Sub


--

HTH

RP
(remove nothere from the email address if mailing direct)


"PokerZan" wrote in
message ...

Hello,

I have created a UserForm that over time I have had to add and move
around aspects of in order to complete the project.

Now my problem is that becuase I added to, took away, and moved fields
from the form as time progressed, the tab sequence is a "little off"
(big understatement). What is the process I need to use to alter the
tab order within VBA so that when the form is tabbed through that it
will go in the sequence that I desire.

Thank you in advance,

PZan


--
PokerZan
------------------------------------------------------------------------
PokerZan's Profile:

http://www.excelforum.com/member.php...o&userid=23480
View this thread: http://www.excelforum.com/showthread...hreadid=389214





All times are GMT +1. The time now is 11:41 PM.

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