AddItem

<< Click to Display Table of Contents >>

 

AddItem

AddItem([pvargItem], [pvargIndex])

This method is used to add items to a List. The pvargItem parameter is a String containing a text to add to a List and, if omitted, adds an empty String. The pvargIndex parameter is the index of a text on a List and, if omitted, the value of the pvargItem parameter is added as the last item on the List. Example:

Sub CommandButton1_Click()
  EntryCount = EntryCount + 1
  ListBox1.AddItem(EntryCount & " - Selection")
End Sub

Was this page useful?