View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Multiselect list box

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)


"ptaylor" wrote in message
...
I have created a list box on a worksheet and can set its
properties in VBA as follows:

ActiveSheet.Shapes("ListBox1").ControlFormat.ListF illRange
= "B5:B8"
ActiveSheet.Shapes("ListBox1").ControlFormat.Multi Select
= xlExtended

How do I determine the list items that have been selected?
The .Selected(index) (boolean) property is not a property
of the ControlFormat object.

TIA
P Taylor