List box multi

  • Thread starter Thread starter Guest
  • Start date Start date
When setting the MultiSelect property to multiple choice:
- ListBox1.ListIndex cannot be used to check for -1 .
- You need to loop though each item and check its Selected() property
(true/false)

Dim i As Long
For i = 0 To ListBox1.ListCount - 1
MsgBox i & " - " & ListBox1.Selected(i) & " - " & Listbox1.List(i)
Next

Regards,
Sebastien
 

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

Similar Threads


Back
Top