Viewer.LayerCount property (Visio Viewer)

Gets the number of layers in the current drawing open in Microsoft Visio Viewer. Read-only.

Syntax

expression.LayerCount

expression An expression that returns a Viewer object.

Return value

Long

Remarks

If there are no layers in the drawing, the LayerCount property returns 0.

Example

The following code gets the count of layers in the drawing open in Visio Viewer.

Debug.Print vsoViewer.LayerCount

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.