Multi select ListBox

  • Thread starter Thread starter Gerry
  • Start date Start date
G

Gerry

I have a multiselect list box set to Extended.
The help file tell me that when a listbox is set to
simple or extended it's value is always null.
How can I confirm whether an extended listbox is
selected or not.
I have a button that I want disabled until both of my
listboxes are selected & then enable the button.
If only one is selected I don't want the button enabled.

Thanks
 
Hi,
The list box has an ItemsSelected collection which has a Count property
which you can check. So...

If Me.List6.ItemsSelected.Count > 0 Then
MsgBox "yes, there are items selcted in this list box"
End If
 
Thanks Dan,

I found something in the Help file to that iterates thru
all the items in the box to see which ones are slected if any.
But your suggestion is more simple.
Thanks Again
 
Back
Top