I have an Excel form that contains a tab control. In the various tabs of the
tab control, I have text boxes that I want to be able to tab through
consecutively, when the user hits the tab key. I have yet to figure out how
to set the taborder of these controls on a tab control.
Is there a way to do this short of using the KeyDown event in each of these
controls to test for vbKeyTab? What I am doing now is testing for the
vbKeyTab and if it is the key that was pressed, I am displaying the next tab
control and setting the focus to the specific textbox.
Dale

Signature
Email address is not valid.
Please reply to newsgroup only.
Peter T - 22 Aug 2007 14:40 GMT
Do you mean you 'tab control' as in tabstrip, if so what do you mean by " In
the various tabs of the
> tab control, I have text boxes".
Regards,
Peter T
> I have an Excel form that contains a tab control. In the various tabs of the
> tab control, I have text boxes that I want to be able to tab through
[quoted text clipped - 10 lines]
> Email address is not valid.
> Please reply to newsgroup only.
Dale Fye - 23 Aug 2007 14:34 GMT
In the toolbox, it is called a multi-page (I usually work in Access, and we
don't have two controls with this same functionality).
It appears that each page in this "multipage" control has it's own tab
sequence, so what I ended up doing is using the KeyDown event in each of the
text boxes to test for the tab key. If it was depressed, I make the next
"page" of the multipage visible and set the focus to the textbox.

Signature
Email address is not valid.
Please reply to newsgroup only.
> Do you mean you 'tab control' as in tabstrip, if so what do you mean by " In
> the various tabs of the
[quoted text clipped - 21 lines]
> > Email address is not valid.
> > Please reply to newsgroup only.
Peter T - 23 Aug 2007 17:13 GMT
As you say controls on each page have their own tab sequence. Normally that
works fine as at the beginning or end (shift-tab) of the sequence focus
moves to other controls on the form. User can change page with
Ctrl-PageUp/PageDown.
You could change the 'Cycle' property for each page. Rather than explain
experiment for yourself.
If you particularly want tab to activate the next page by all means trap the
keydown or perhaps keyup event. Presumably you will only need to trap tab in
controls having first and last tab order's.
Why not give each page caption an accelerator to make it more intuitive to
the user how to activate a page-tab.
Regards,
Peter T
> In the toolbox, it is called a multi-page (I usually work in Access, and we
> don't have two controls with this same functionality).
[quoted text clipped - 33 lines]
> > > Email address is not valid.
> > > Please reply to newsgroup only.
Dale Fye - 24 Aug 2007 13:14 GMT
Peter,
Have already implemented the "accelerator" concept with these tabs. My goal
here is it make the data entry as easy as possible, so I like to use a
keyboard centric approach. Tabbing between data input controls is quite
common, and I make every effort to take advantage of hot keys as well.
If I can keep their hands on the keyboard, rather than switching back and
forth from the keyboard to the mouse, data entry is significantly faster.
Thanks for your input.

Signature
Email address is not valid.
Please reply to newsgroup only.
> As you say controls on each page have their own tab sequence. Normally that
> works fine as at the beginning or end (shift-tab) of the sequence focus
[quoted text clipped - 57 lines]
> > > > Email address is not valid.
> > > > Please reply to newsgroup only.
Michael - 22 Aug 2007 14:44 GMT
If the Text boxes are part of a form, you can set the following properties
under the behavior category to true:
AutoTab
TabKeyBehavior

Signature
If this posting was helpful, please click on the Yes button.
Regards,
Michael Arch.
> I have an Excel form that contains a tab control. In the various tabs of the
> tab control, I have text boxes that I want to be able to tab through
[quoted text clipped - 7 lines]
>
> Dale
Vergel Adriano - 22 Aug 2007 14:46 GMT
The TabIndex property sets the tab order of the controls. TabStop property
must also be True.

Signature
Hope that helps.
Vergel Adriano
> I have an Excel form that contains a tab control. In the various tabs of the
> tab control, I have text boxes that I want to be able to tab through
[quoted text clipped - 7 lines]
>
> Dale
Michael - 22 Aug 2007 14:54 GMT
And yes don't forget to set the order by using the TabIndex property with the
right digit for the tabbing order you need.

Signature
If this posting was helpful, please click on the Yes button.
Regards,
Michael Arch.
> I have an Excel form that contains a tab control. In the various tabs of the
> tab control, I have text boxes that I want to be able to tab through
[quoted text clipped - 7 lines]
>
> Dale