View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
leung leung is offline
external usenet poster
 
Posts: 119
Default Combo Boxes getting data from Work Sheet.


I think you can put below code so the combo box can add item of cell value
in the range of source_list.

For Each cell In Range("source_list").Cells
ComboBox1.AddItem cell.Value
Next



"Brian" wrote:

I have a User Form that has a combo Box on it. Is it possible for the Combo
Box to get it's Data from a Work Sheet in the same Work Book as the User Form
instead of doing in Code as follows:

With Me.Engineer_2
.AddItem "1"
.AddItem "2"
.AddItem "3"
.AddItem "4"
.AddItem "5"
.AddItem "6"
End With

The reason I ask is because I would like to be able to set it up as follows:
Combo Box 1 = Customer 1
Combo Box 2 = State
Combo Box 3 = Site ID

User Picks the Customer, then the State for that Customer, then the Site ID
for that Customer.

Each State (9-States) has about 450 Sites for each of the 4 Customers, so
writing it in Code would take forever. Plus I already have all the Data in a
Work Book, so all I have to do is add a Sheet for each customer and Copy &
Paste the Data.

I want to use the Comboxes as a process of elimanation to narrow it down.