A single-select list box is easy: just set its value to Null.
For a multiselect list box:
'----- start of code -----
Function ClearListBoxSelections(lst As Access.ListBox)
Dim intI As Integer
With lst
For intI = (.ItemsSelected.Count - 1) To 0 Step -1
.Selected(.ItemsSelected(intI)) = False
Next intI
End With
End Function
'----- end of code -----
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.