Multi select ListBox

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
 
D

Dan Artuso

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
 
G

Gerry

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
 

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

Top