ListCount Property

Applies To

ComboBox control, ListBox control.

Description

Returns the number of list entries in a control.

Syntax

object.ListCount

The ListCount property syntax has these parts:

Part

Description

object

Required. A valid object.


Remarks

The ListCount property is read-only. ListCount is the number of rows over which you can scroll. ListRows is the maximum to display at once. ListCount is always one greater than the largest value for the ListIndex property, because index numbers begin with 0 and the count of items begins with 1. If no item is selected, ListCount is 0 and ListIndex is –1.

See Also

List property, ListIndex property, Selected property.

Example

See the ListBox control example.