Userform making a specific combo box active first every time

Houdinii

New Member
Joined
Aug 12, 2012
Messages
13
I have a user form with several user boxes on it. From what I can see it works just fine the first time around. I have set "tabindex = 0" on 1st combo box and "tabindex = 1" on second combo box. After filling both boxes and pressing enter to complete the input I then bring up the combo box again to add another item and the "ok" button is selected with is set for "tabindex = 4".

How do I get it to select 1st combo box everytime.

Thanks in advance for any ideas on this.
 

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.

MOHAMMED A. WASEEM

New Member
Joined
Aug 8, 2009
Messages
27
Hi,
under the OK button (code) write :
me.combobox1.setfocus

every time when you open the userform, the focus shall be on combobox1
 

Forum statistics

Threads
1,141,714
Messages
5,708,015
Members
421,540
Latest member
quocbinh

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
Top