List Box - MultiSelect

  • Thread starter Thread starter Bill
  • Start date Start date
B

Bill

Hello,
I have a list box where a user can select multiple items. How do I figure
out which items are selected using VBA? I thought there was a selecteditem
property, but I don't seem to find it.

Thanks,

Bill
 
Hi Bill,
Here is some code as a starter


With Me.ListBox1
For i = 0 To .ListCount - 1
If .Selected(i) Then
Msgbox .List(i)
End If
Next i
End With



--

HTH

RP
(remove nothere from the email address if mailing direct)
 
Bob,

Thanks a lot. I appreciate it.

Bob Phillips said:
Hi Bill,
Here is some code as a starter


With Me.ListBox1
For i = 0 To .ListCount - 1
If .Selected(i) Then
Msgbox .List(i)
End If
Next i
End With



--

HTH

RP
(remove nothere from the email address if mailing direct)
 

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