jmbro10
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?
Thanks!
Jack Cowley
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...
hth,
Jack
accesshawaii
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.
CODE
Dim x As Integer
'ABC Code
For x = 0 To MyListBox.ListCount - 1
MyListBox.Selected(x) = False
Next x
jmbro10
Dec 5 2007, 06:01 PM
Thanks so much! too simple!
Jack Cowley
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...
Jack
accesshawaii
Dec 5 2007, 06:43 PM
You're welcome.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.