PC Review


Reply
Thread Tools Rate Thread

Binding data from database to excel drop down

 
 
JigiSweetu
Guest
Posts: n/a
 
      15th Feb 2007
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

 
Reply With Quote
 
 
 
 
=?Utf-8?B?VG9tIE9naWx2eQ==?=
Guest
Posts: n/a
 
      15th Feb 2007
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
>
>

 
Reply With Quote
 
Jignesh Gandhi
Guest
Posts: n/a
 
      15th Feb 2007
Thanks Tom

That works......

Regards,
Jignesh Gandhi

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
binding data to drop down menu Eric Layman Microsoft ASP .NET 3 29th Mar 2007 08:42 PM
binding to current value in a drop down list when populating from a database TB Microsoft ASP .NET 7 2nd Nov 2005 08:59 PM
Excel Drop Down box or check box data to Excel Database =?Utf-8?B?VG90YWxseUNvbmZ1c2Vk?= Microsoft Excel Misc 3 26th Oct 2005 05:36 PM
Binding data to a Drop Down List =?Utf-8?B?UmljaGFyZCBQaWRjb2Nr?= Microsoft ASP .NET 2 18th Dec 2004 12:56 AM
Is Data Binding for Drop Down box slow? Raghavendra Narayana Microsoft ADO .NET 2 17th Sep 2003 06:05 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:52 AM.