Returns the number of items in the list portion of a control.
object.ListCount
The object placeholder represents an object expression that evaluates to an object.
ListCount provides specific information for each control, as described in the following table.
Control | Information |
---|---|
ComboBox, ListBox | Number of items in the list. |
If no item is selected, the ListIndex property value is –1. The first item in the list is ListIndex = 0, and ListCount is always one more than the largest ListIndex value.