Userform textbox's acting differently....

AndrewMB

Board Regular
Joined
Feb 3, 2008
Messages
75
I have an issue with two userforms I'm using. They are both the same for the most part. Both contain two rows of textboxes, going down the form.

On the first form, when it opens, the top left text box has the cursor already in it and if i enter a number i can press enter and it will move down to the next textbox.

when it reaches the bottom one, if i hit enter, it goes to the top of the second row and then down that one.

Thats what i want.


The second form however, when it opens, has the commandbutton highlighted with no cursor in the top left textbox. i have to click the top left textbox to produce the cursor.

Also, if i enter a number and press enter it doesnt move downwards, it moves across and if i hit enter in that textbox it immediately jumps to the commandbutton.

I can't find any difference between the setup of both userforms.

Its driving me mad!
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
You need to re-set tabindexes.
With Form in Design mode, Open the Properties box

Select the Command Button and set TabIndex property to 0 (zero)
Go to the bottom of the 2nd column, work your way up, selecting the control and setting TabIndex to zero.
Then start at the bottom of your first column and go up doing the same.

Hint: The TabIndexes of the previously set controls will all adjust as you move from one control to the next.
 
Upvote 0
Sounds like you need to change the tab index order (View - Tab order)
 
Upvote 0
well that seems so much easier! Didn't know that was there.
Tweedle does like to learn these things.
 
Upvote 0
Oh, thats sorted it. Amazing. I never had any idea about tab indexes or the View, Tab Order...

Thank you both of you!
 
Upvote 0

Forum statistics

Threads
1,224,590
Messages
6,179,750
Members
452,940
Latest member
rootytrip

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top