clearing a list box

A

Andy G

I have a list box that is set to simple multi select. I have a clear button
on the form and need to clear off any selections a user might have
previously made to this list box. How do I clear the list box?

Thanks.
 
A

Andy G

Sorry, I should try some stuff before asking a question....this is what
worked.

intItems = lstTrioProg.ListCount - 1
For intCtr = 0 To intItems
lstTrioProg.Selected(intCtr) = False
Next intCtr
 
G

Guest

Me.lstTrioProg.Requery
will also do it.

Andy G said:
Sorry, I should try some stuff before asking a question....this is what
worked.

intItems = lstTrioProg.ListCount - 1
For intCtr = 0 To intItems
lstTrioProg.Selected(intCtr) = False
Next intCtr
 

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