Viewer.LayerCount property (Visio Viewer)
Gets the number of layers in the current drawing open in Microsoft Visio Viewer. Read-only.
expression.LayerCount
expression An expression that returns a Viewer object.
Long
If there are no layers in the drawing, the LayerCount property returns 0.
The following code gets the count of layers in the drawing open in Visio Viewer.
Debug.Print vsoViewer.LayerCount
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.