retrive data from listbox in a loop

  • Thread starter Thread starter Lal
  • Start date Start date
L

Lal

I have listbox with 10 items I selected 5 of them from the listbox
i want to retrive the selected data in a for - loop command

how can it possible

please help me
 
Lal,

For the listbox you have to use the DataRowView

Roughly typed not tested

\\\
For each drv as datarowview in listbox.selecteditems
'do your stuf as drv(0)
Next
///

I hope this helps?

Cor
 
This is one way, there are usually other ways.

Dim i As String

For Each i In lBox1.SelectedItems

Debug.WriteLine(i)

Next
 

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