onfexcel-how-to-add-item-to-a-combobox

How to Add Item to ComboBox (populate ComboBox with items)

Users can select from predefined values assigned to the ComboBox. The UserForm creator has to be define this Values.

For example: gender (male/female), age (1, 2, 3, 4,…), etc.

Populate ComboBox when UserForm Initialize

This macro will add items to the ComboBox when Userform will be loaded or show.

You need to use the INITIALIZE event.

Private Sub UserForm_Initialize()
ComboBox1.Value = ""
ComboBox2.Value = ""
     With ComboBox1 'change the name of the ComboBox
            .AddItem ("Value lower than 10") ' here you can write any value you need
            .AddItem ("Value lower than 20")
            'add as many items you need
        End With
End Sub
0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *