Thread: List box multi
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
sebastienm sebastienm is offline
external usenet poster
 
Posts: 694
Default List box multi

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
"hdodson" wrote:

how can you use the multi and extend options with a list box??