'Excel - Display ComboBox DropDown by VBA
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.
Solution 1:[1]
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...
- Using a simple command
Tried And Tested
Private Sub CommandButton1_Click()
ComboBox1.DropDown
End Sub
- Using Sendkeys. Sendkeys are unreliable if not used properly.
Tried And Tested
Private Sub CommandButton1_Click()
ComboBox1.SetFocus
SendKeys "%{Down}"
End Sub
SCREENSHOTS

Solution 2:[2]
I have had plenty of crashes with .dropdown but find some success with the SendKeys...
Solution 3:[3]
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
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | |
| Solution 2 | Harry S |
| Solution 3 | Harry S |
