Multicolumn Listbox Value to Spreadsheet

C

chris

I am attempting to extract a single value from a multicolumn listbox.
For example, the multicolumn listbox has three columns as follows:

Item# Description Price
1111 Prod A 3.99
2222 Prod B 5.99

Is there a way to take the value from only the third column for the
selected item?

Thank you in advance!
 
W

wisccal

You can use the Listbox's List property like an array. That is:

Dim price As Integer

price = MyListbox.List(theColumn, theRow)

In your case, theColumn would be 2 (index starts at 0). TheRow
corresponds to the price index.

Regards,
Steve
 
C

chris

Thank you Steve, this did the trick!

You can use the Listbox's List property like an array. That is:

Dim price As Integer

price = MyListbox.List(theColumn, theRow)

In your case, theColumn would be 2 (index starts at 0). TheRow
corresponds to the price index.

Regards,
Steve
 

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