ControlFormat.ListCount property (Excel)

Returns the number of entries in a list box or combo box. Returns 0 (zero) if there are no entries in the list. Read-only Long.

Syntax

expression.ListCount

expression A variable that represents a ControlFormat object.

Example

This example adjusts a combo box to display all the entries in its list. If Shapes(1) does not represent a combo box, this example fails.

Set cf = Worksheets(1).Shapes(1).ControlFormat 
cf.DropDownLines = cf.ListCount

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.