View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
IanC[_2_] IanC[_2_] is offline
external usenet poster
 
Posts: 157
Default Clearing a listbox

From VB Help:

expression.RemoveItem(Index, Count)

expression An expression that returns a ControlFormat object.

Index Required Long. The number of the first item to be removed. Valid
values are from 1 to the number of items in the list (returned by the
ListCount property).

Count Optional Variant. The number of items to be removed, starting at
item Index. If this argument is omitted, one item is removed. If Index +
Count exceeds the number of items in the list, all items from Index through
the end of the list are removed without an error.


--
Ian
--
"wbntravis" wrote in message
...
I have a listbox loaded from addItem.
The listbox is on a userform.
There comes a moment in the program
when I want the listbox to unload what is in the listbox
and reuse the same listbox so I can add different items.
Is there a fast way to do that, without unloading the form?

Or is the a way to quickly clear a listbox contents
and repopulate it with other items?




--
wbnTravis, from Oklahoma