Reputation: 1251
I need a workbook to display the Combobox List Dropdown when it opens.
The combobox in the Workbook is a form control, so a shape.
Cant seem to find the associated property.
Upvotes: 5
Views: 34048
Reputation: 511
I consider best UserForm combo box is as Above by Siddharth Rout ComboBox1.SetFocus SendKeys "%{Down}"
for some Combo boxes on a worksheets CB.DropDown Is enough .. Just as well as they have no setfocus or activate
Upvotes: 0
Reputation: 511
I have had plenty of crashes with .dropdown but find some success with the SendKeys...
Upvotes: 0
Reputation: 149277
If you are using ActiveX Controls then see the below, else if you are using Form Controls then replace them with ActiveX Controls if you want the drop down to happen via code. The below code will work for both ActiveX Controls in a Form as well as Worksheet. If the Control is on a worksheet then change ComboBox1.SetFocus
to ComboBox1.Activate
Two ways I can think of...
Tried And Tested
Private Sub CommandButton1_Click()
ComboBox1.DropDown
End Sub
Tried And Tested
Private Sub CommandButton1_Click()
ComboBox1.SetFocus
SendKeys "%{Down}"
End Sub
SCREENSHOTS
Upvotes: 10