Microsoft KB Archive/153308

= How To Easily Set Up the Tab Sequence of a Form =

Article ID: 153308

Article Last Modified on 7/15/2004

-

APPLIES TO


 * Microsoft Visual Basic 5.0 Learning Edition
 * Microsoft Visual Basic 6.0 Learning Edition
 * Microsoft Visual Basic 5.0 Professional Edition
 * Microsoft Visual Basic 6.0 Professional Edition
 * Microsoft Visual Basic 5.0 Enterprise Edition
 * Microsoft Visual Basic 6.0 Enterprise Edition
 * Microsoft Visual Basic 5.0 Control Creation Edition
 * Microsoft Visual Basic 4.0 Standard Edition
 * Microsoft Visual Basic 4.0 Professional Edition
 * Microsoft Visual Basic 4.0 Professional Edition
 * Microsoft Visual Basic 4.0 16-bit Enterprise Edition
 * Microsoft Visual Basic 4.0 32-Bit Enterprise Edition

-



This article was previously published under Q153308



SUMMARY
The TAB key is often used to navigate sequentially through multiple controls on a form. The order in which you move through the controls depends on their TabIndex value, not their position on the form. This article provides you with a simple method you can use to set up a required tab sequence.



MORE INFORMATION
By default, the TabIndex property is set when you place a control on a form relative to the other controls on the form. To set up a required tab sequence, in the design environment, select the control you wish to be last in the tab sequence. Set its TabIndex to Zero. Select each control in the opposite direction from that which the user will use to navigate through the form, and set each control's TabIndex to Zero.

Each time you set the TabIndex for a control, all the other controls have their TabIndex recalculated so as you set them to Zero all the other controls are incremented by one.

