The Count property returns the number of documents, layers, shapes, windows, or objects in a selection. Returns a long. This is a read-only property.
Syntax
object.Count
Example 1
This example demonstrates how to return the number of shapes.
Debug.Print MapShapes.Count
Example 2
This example demonstrates how to return the number of layers in a plot document.
Debug.Print PlotLayers.Count
Used by: Documents collection, Layers collection, Selection collection, Shapes collection, Windows collection