M madrav72 Registered User. Local time Today, 09:12 Joined Dec 1, 2001 Messages 81 Jan 11, 2006 #1 hi can someone state how to clear a list box thanks
KenHigg Registered User Local time Today, 04:12 Joined Jun 9, 2004 Messages 13,327 Jan 11, 2006 #2 What do you mean 'Clear'? Do you mean 'Un-Select' everything or remove the available selections completly?
What do you mean 'Clear'? Do you mean 'Un-Select' everything or remove the available selections completly?
Mile-O Back once again... Local time Today, 09:12 Joined Dec 10, 2002 Messages 11,316 Jan 11, 2006 #3 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
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
kousotsu Eeny, meeny, miney...Jim? Local time Today, 04:12 Joined Apr 2, 2004 Messages 23 Feb 28, 2006 #4 Or to deselect all, just set me.myListBox.Value = Null