taborder on Excel form

D

Dale Fye

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
 
M

Michael

If the Text boxes are part of a form, you can set the following properties
under the behavior category to true:
AutoTab
TabKeyBehavior
 
V

Vergel Adriano

The TabIndex property sets the tab order of the controls. TabStop property
must also be True.
 
M

Michael

And yes don't forget to set the order by using the TabIndex property with the
right digit for the tabbing order you need.
 
D

Dale Fye

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.

--
Email address is not valid.
Please reply to newsgroup only.


Peter T said:
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
 
P

Peter T

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


Dale Fye said:
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.
 
D

Dale Fye

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.
 

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

Top