Dec 5 2007, 05:50 PM
Hi, is there a quick way to clear a listbox w/value list? I see how to use removeitem on a selected item but how can I just quickly clear it?
Dec 5 2007, 05:57 PM
Me.ListBoxName.RowSource = ""
I assume you want to remove the values and not just clear the selected items in the list box...
Dec 5 2007, 05:59 PM
If you're trying to clear all the selections on a multi-select list box, you can do the following.
Dim x As Integer
For x = 0 To MyListBox.ListCount - 1
MyListBox.Selected(x) = False
Dec 5 2007, 06:01 PM
Thanks so much! too simple!
Dec 5 2007, 06:05 PM
You are welcome.... I am NOT a fan of value lists, as I prefer to use tables. If, of course, you are building your list box on the fly then you approach may be more advantages...
Dec 5 2007, 06:43 PM
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here