Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

EXCEL: Drop Box Solution

Status
Not open for further replies.

bont

Programmer
Sep 7, 2000
200
US
Hello All,

I had been looking for a simple solution such as this for a while now. The goal was to be able to create an Excel worksheet with lists of data to populate multiple Drop Down Boxes on another sheet. To do so we have the two (or more sheets) and within the Open Workbook call we place something similar to:

Private Sub Workbook_Open()
Dim i As Integer
For i = 1 To 10
Sheet1.ComboBox1.AddItem Sheet2.Range("A" & i).Text
'sheetW/combobox.ComboBoxName.AddItem sheetW/Codes.Range("Column Letter" & Row Number).Text
Next i
End Sub

This will populate the box correctly. Now this is just for simple Excel data entry. If you want function to apply to the drop down when a choice is chosen, you will have to look for the code elsewhere, and will no doubtedly be on the OnClick function of the combo1 box.

Thanks,

Raker
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top