Karl001
asked on
How to clear selected items in a multi-select listbox?
How to clear selected items in a multi-select listbox?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks
Glad to help.
I actually have a subroutine that sits in a standard code module which I use to clear all selections in a listbox. It makes it easier to do this from all forms with a single line of code:
MultiListClearSelections me.lst_YourListName
I actually have a subroutine that sits in a standard code module which I use to clear all selections in a listbox. It makes it easier to do this from all forms with a single line of code:
Public Sub MultiListClearSelections(lst as List)
Dim varItem as Variant
for each varItem in lst.itemsselected
lst.Selected(varItem) = False
Next
End Sub
This makes it easy to call this from a button click on any form:MultiListClearSelections me.lst_YourListName
ASKER
Thanks very much
You want to remove the selected items from ListBox?
here is the code.
Open in new window