Binding data from database to excel drop down

J

JigiSweetu

Hi

I'm using Excel 2002. In one of the excel sheets, I have dropdown
control (Combo box). I want to populate the dropdown with the data and
values i.e. the data is visible to the user and value is the actual
value associated with an item. The data is coming from sql server
database. To be precise, two columns are fetched from database,
itemType and itemName.
I'm able to add the itemName using addItem method. But I'm not able to
bind the itemType to the associated itemName. Can anyone help me out?

Thanks
Jignesh Gandhi
 
G

Guest

Assuming columncount for the combobox is set to 2

with combobox1
.AddItem Itemname
.List(.Listcount -1, 1) = ItemType
End with
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top