title | keywords | f1_keywords | api_name | ms.assetid | ms.date | ms.localizationpriority | ||
---|---|---|---|---|---|---|---|---|
ControlFormat.ListCount property (Excel) |
vbaxl10.chm630081 |
|
|
9f7b60aa-8bf9-a7ec-c198-0a6f6316cc3c |
04/23/2019 |
medium |
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.
expression.ListCount
expression A variable that represents a ControlFormat object.
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
[!includeSupport and feedback]