Full Version: Populate a combo box
UtterAccess Discussion Forums > Microsoft® Office > Microsoft Excel
tair23
How do I populate my combo box with Items? I am sure it is something to do with AddItem but I can't seem to get mine ot work. Any one have an example of a sheet they could attach?

Thanks!
dannyseager
are you talking about a combo box directly on the spreadsheet or on a userform?
tair23
Spread sheet
Luceze
Pardon me for interupting but I have an example sheet from another post that shows the syntax for both a userform and worksheet object.

See attached.
g2gsr
I'm having an issue with getting my combobox to populate from a list using your code. I did not include the second macro that is going to run based on what is selected from the combobox, as it is a huge file. It is an order history for my customers. I currently use a listbox, but our customer list is so long that this is quite inefficeint. Once a customer is selected, my second macro finds all the items that this customer has bought in the past. I'm assuming that once I get my combo box to work, I just have to change (in my second macro) the imput from listbox to the new combobox.

Sorry for the long background, all I need is some help with the combobox problem. Thanks so much.
Luceze
Hello,

See attached.

You were trying to use a forms control with code meant for use with an ActiveX control from the control toolbox. I included examples of both in the attachment.

HTH,
g2gsr
Gotcha, thanks so much. I'm used to using Access, so I figured what I needed was just form controls. I didn't even see the control toolbox. Thanks so much for your help =).
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.