ListBox Multiple Selections

G

Guest

I have a ListBox with the SelectionMode set to MultiSimple.
How can I iterate thru it using a for next loop to fill an array?
Listbox
For
Row 1 = Array(1)
Row 2 = Array(2)
Next
And so on.
 
G

Guest

Gus,

Are you trying to copy the listbox's selected items to an array? If so, you
can do this:

Dim SelectedItems(listbox1.SelectedItems.Count - 1) As Object

listbox1.SelectedItems.CopyTo(SelectedItems, 0)

Kerry Moorman
 

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