For a multi-select list box, you need the loop, like this:
Dim varI As Variant
With Me.lstMyListbox
For Each varI In .ItemsSelected
.Selected(varI) = False
Next varI
End With
or else you can -- at the cost of rerunning the rowsource query -- reset the
list box's rowsource:
With Me.lstMyListbox
.RowSource = .RowSource
End With
I would use the former, unless I also need to requery the list box.
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.