Link to home
Start Free TrialLog in
Avatar of yadafarin
yadafarin

asked on

how to clear all items in listbox in VBA?

hi
in VBA, how can i remove all items in listbox object?
I don't know number of items.
thanks
Avatar of rockiroads
rockiroads
Flag of United States of America image

is it bounded?
if so, set rowsource to ""

e.g. listbox.rowsource = ""
u may need to refresh/requery it

Avatar of yadafarin
yadafarin

ASKER

no, it hasn't rowsource.
I add items in listbox by VBA code (with .Additems).
ASKER CERTIFIED SOLUTION
Avatar of rockiroads
rockiroads
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
did this work