clear Method

            Applies To

Clears the contents of a Listbox or OptionGroup object.

Syntaxga

object.clear()

Parameters

object

A Listbox or OptionGroup script object.

Remarks

The clear method is not supported by an object whose RowSource is bound to a Recordset object.

Example

Sub AddListBoxItems(aArrayOfItems)
Dim iCount
   'clear the items out of the list box
   MyListBox.clear()
   for iCount = 0 to ubound(aArrayOfItems)
      MyListbox.addItem(aArrayOfItems(iCount))
   next
End Sub