Populating Active X Controls

  • Thread starter Thread starter Steven Stadelhofer
  • Start date Start date
S

Steven Stadelhofer

Can you tell me how to populate an Active X Control -
e.g., a combo box with a small list e.g., three items,
like apples, oranges, and pears. I am not familiar with
Visual basic - can this be done somewhere in the
properties window?

Thank you,
Steve
 
Steven,

If you put your list on a worksheet and name the range, just put this name
as the ListFillRange (if the combobox is on a worksheet), or put it as the
RowSource (if the combobox is on a form).

Or use this code (note that I used the activate event, you can use any event
or put it into a standard sub):

Private Sub UserForm_Activate()

With ComboBox1
.AddItem "apples"
.AddItem "oranges"
.AddItem "pears"
End With

End Sub

steve
 
Back
Top