View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 6,953
Default Binding data from database to excel drop down

Assuming columncount for the combobox is set to 2

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

--
Regards,
Tom Ogilvy


"JigiSweetu" wrote:

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