problem moving focus combobox to another

Scoobidoo

New Member
Joined
Sep 29, 2014
Messages
7
Hi,

I've about 140 comboboxes and a user should choose a value in each combobox.
In order to make input easier I'd like to drop-down automatically the next combobox after the user has chosen a value in the previous one.
For a start I tried it with 2 comboboxes but Excel crashes always when trying to move the focus.

Does anyone have an idea how to drop-down automatically the next combobox?
My not working code:

Code:
Private Sub Worksheet_Activate()
     Me.ComboBox1.DropDown
End Sub

  
Private Sub ComboBox1_Change()
    If ComboBox1.ListIndex > -1 Then
          Me.ComboBox2.DropDown
    End If
End Sub
 
@ mikerickson

Thank you for testing my code.

Do I understand you well? Does the combobox2 open automatically after you 've chosen a value in combobox1?

If so, which version of Excel do you use?

I've tried "Combobox2.setfocus" but at execution I get error 438 "property not supported"
 
Upvote 0

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
The code I provided is for user form controls. ActiveX isn't supported on my Mac. My guess that it would work for ActiveX was apparently wrong.
 
Upvote 0

Forum statistics

Threads
1,215,779
Messages
6,126,850
Members
449,344
Latest member
TFXm

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