View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Reference Combo Box to Column of Data

You can use the Userform_initialize event to populate the values into that
combobox.

One way is:

Option Explicit
Private Sub UserForm_Initialize()
With Worksheets("Sheet1")
Me.ComboBox1.List _
= .Range("b1", .Cells(.Rows.Count, "B").End(xlUp)).Value
End With
End Sub

But there are lots of other ways, too. They can be useful if want to format the
values in the combobox (money/time/dates) or want to skip cells that don't meet
a certain criteria.


Benjamin wrote:

Question: How do I reference a list of data from a column in a combo box

I have a drop down menu in a Form, I figure use a combo box
I'd like to have it reference a specific name range in a sheet or Column for
instance.
I'll have apples, pears, peaches, etc in Column B
So if a user changes column B then the combo box will reflect that change
when it's opened.


--

Dave Peterson