Retrieving Key value from dropdown

G

Gummadi

Hi,

I am using a dropdown in Excel Sheet. I have been able to assign a set of
Key-Value pairs to the dropdown. Like for example the text that will be
displayed in drop down are "text101", "text102", "text103" and the
corresponding key values are 101, 102, 103.

Then i am trying to retrieve the key that is selected by the user. I am able
to successfully retrieve the text that is selected but i am not able to get
the key.
If the user selects the text "text102", i should be able to get 102.

I am using Microsoft.Office.Interop.Excel.DropDown xlDropDown.
Can someone tell me how should i retrieve the key value.

Thanks,
Shail
 
P

Patrick Molloy

are you referring to the ActiveX combobox control? so you have the
ColumnCount set to 2, now also set the boundcolumn to 2
 
G

Gummadi

I am using Microsoft.Office.Interop.Excel.DropDown and i do not see the
columnCount and boundColumn properties.
 
P

Patrick Molloy

suggest you switch to the ActiveX controls.

Gummadi said:
I am using Microsoft.Office.Interop.Excel.DropDown and i do not see the
columnCount and boundColumn properties.
 
G

Gummadi

thanks .... but i meant a code sample.
if you could provide the code to the example, that will be great ...
 

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