get list box selected items by index

  • Thread starter Thread starter iccsi
  • Start date Start date
I

iccsi

I need get slected items information from my list box by index number.

I just wonder any property can pass to get my data?


Your help is great appreciated,
 
Look at the ItemsSelected collection and the ItemData (zero based rowindex)
property in the object browser.
 
iccsi said:
I need get slected items information from my list box by index number.

I just wonder any property can pass to get my data?


You may also want to check VBA Help on the Columns property.
 
The index is in the ItemData(0) property. Try something like:

Dim varCurItem as Variant
For Each varCurItem In lisControl.ItemsSelected
debug.print lisControl.ItemData(varCurItem)
Next varCurItem
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com


Look at the ItemsSelected collection and the ItemData (zero based
rowindex)
property in the object browser.
--
Arvin Meyer, MCP,
MVPhttp://www.datastrat.comhttp://www.mvps.org/accesshttp://www.accessmvp.com








- Show quoted text -

Thanks for helping,
ItemsSelected is a collection.
I need scroll the whole collection. am I right?
Are there any way to get the row using indexes like MyListBox.index(1)
or MyListBox.ItemsSelected(1)?


Thanks again,
 

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

Back
Top