clear list box

madrav72

Registered User.
Local time
Today, 09:12
Joined
Dec 1, 2001
Messages
81
hi

can someone state how to clear a list box

thanks
 
What do you mean 'Clear'? Do you mean 'Un-Select' everything or remove the available selections completly?
 
To remove all options:

Code:
Me.MyListBox.RowSource = vbNullString


To deselect all options:

Code:
Dim varItem As Variant
    
For Each varItem In Me.lstExample.ItemsSelected
    Me.MyListBBox.ItemsSelected(varItem) = False
Next
 
Or to deselect all, just set me.myListBox.Value = Null
 

Users who are viewing this thread

Back
Top Bottom