Rivers31334
Rivers31334

Reputation: 654

Populating a combobox on a userform from a range of cells

I am trying to populate a combobox with a range of cells from another sheet in my workbook (called "Other").

I use the following as a guide, but it is not seeming to work. Can anyone offer me advice? When i run the userform, the combobox is not populated with anything.

Private Sub ComboBox1_Change()
    Me.ComboBox1.List = Worksheets("Other").range("C2:C11").Value
End Sub

Upvotes: 8

Views: 37968

Answers (1)

Excel Hero
Excel Hero

Reputation: 14764

You are using the wrong event procedure ComboBox1_Change. This fires only when the combobox changes value.

Instead, load the list when the userform initializes:

Private Sub UserForm_Initialize()
    ComboBox1.List = [Other!C2:C11].Value
End Sub

Upvotes: 10

Related Questions