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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Populate a Combo Box From Access Table Column 1

Status
Not open for further replies.

cghoga

Programmer
Jun 26, 2003
614
US
Hello,

In Excel how could I auto populate a combo box (list) for a cell with a list of distinct values from a column in an Access DB using VBA?

Thanks!
 
Y dont you do a distinct query in access then use data import in excel. and set the listfillrange property of your combo box set column A
 
Thanks Scottie,

Let me give that a try.

Thanks.


 
Sorry to sound really ignorant on this, but I kind of misled you. It is not a combo box, but a cell with a drop down data validation list.

Will the listfillrange still work?

Is it possibe to run the data import from access each time I open the Excel file so that my list remains current?

Thanks!

 
yes if you record a macro importing the data then copy the code and put it in the Workbook_Open event it will run your code everytime you open it. the question about cell drop down boxes i don't know a great deal but I think you would select where the data comes from to fill the list before hand. y do you need a cell list instead of using a control
 
Great, thanks Scottie!

I need the cell because the worksheet could contain an infinite amount of rows.

Could I still utilize the control?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top