Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
dan dan is offline
external usenet poster
 
Posts: 866
Default Tab Index Not working?

The simplest things can make me crazy.

I have a simple user form. It has three text boxes, and one button (OK).

The text boxes have their TabIndexes set to 0, 1, and 2, and the button has
it's tab index set to 3.

As the user fills in the boxes, I want the focus to shift from box 1 to box
2 to box 3, and finally to the OK button.

I have set the TabIndex in the properties for each control at design time. I
have also added the statements to the Userform_activate() block:
textbox1.tabindex=0
etc.

And here's what happens.
User enters a value in the text box 1. Pressing tab takes the focus to:
TAB --- OK button
TAB --- text box 1
TAB --- text box 2
TAB --- OK button
TAB --- text box 1
TAB --- text box 2
TAB --- text box 3
TAB --- OK button
And then, pressing tab does what I want it to do:
text box 1 --- text box 2 --- text box 3 --- OK button.

So it's messed up the first time through, then it works right.

Can somebody give me an idea for what to look for here? Is there something
else I need to set in software?

Thanks in advance -
Dan
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,092
Default Tab Index Not working?

Set the tab order for UserForm objects in the UserForm. In design mode,
right-click the UserForm surface and select Tab Order. All objects in the
UserForm will be listed. Arrange your tab order here. Any objects in this
list that has had its' Tab Stop property set to False, will be skipped over.

Mike F
"Dan" wrote in message
...
The simplest things can make me crazy.

I have a simple user form. It has three text boxes, and one button (OK).

The text boxes have their TabIndexes set to 0, 1, and 2, and the button
has
it's tab index set to 3.

As the user fills in the boxes, I want the focus to shift from box 1 to
box
2 to box 3, and finally to the OK button.

I have set the TabIndex in the properties for each control at design time.
I
have also added the statements to the Userform_activate() block:
textbox1.tabindex=0
etc.

And here's what happens.
User enters a value in the text box 1. Pressing tab takes the focus to:
TAB --- OK button
TAB --- text box 1
TAB --- text box 2
TAB --- OK button
TAB --- text box 1
TAB --- text box 2
TAB --- text box 3
TAB --- OK button
And then, pressing tab does what I want it to do:
text box 1 --- text box 2 --- text box 3 --- OK button.

So it's messed up the first time through, then it works right.

Can somebody give me an idea for what to look for here? Is there something
else I need to set in software?

Thanks in advance -
Dan



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
complex index function not working mmcap Excel Worksheet Functions 7 April 3rd 09 05:07 AM
IF THEN with Match & Index formula not working yogart Excel Worksheet Functions 16 December 10th 08 06:31 PM
Array formula on INDEX function not working vsoler Excel Worksheet Functions 8 June 3rd 07 07:14 PM
Index Match not working terri Excel Worksheet Functions 2 March 30th 07 06:50 PM
Index/Match not working frosterrj Excel Worksheet Functions 6 May 22nd 06 06:18 PM


All times are GMT +1. The time now is 01:33 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"