UserForm Tab Order

  • Thread starter Thread starter PokerZan
  • Start date Start date
P

PokerZan

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
 
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)
 

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

Back
Top