Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

Latest commit

 

History

History
54 lines (32 loc) · 1.01 KB

pages-count-property-visio.md

File metadata and controls

54 lines (32 loc) · 1.01 KB
title keywords f1_keywords ms.prod api_name ms.assetid ms.date
Pages.Count Property (Visio)
vis_sdr.chm11013330
vis_sdr.chm11013330
visio
Visio.Pages.Count
1e240cc4-07f3-ceb1-7eb3-7a6d5071f630
06/08/2017

Pages.Count Property (Visio)

Returns the number of objects in a collection. Read-only.

Syntax

expression . Count

expression A variable that represents a Pages object.

Return Value

Integer

Example

This Microsoft Visual Basic for Applications (VBA) macro shows how to use the Count property to iterate through a Documents collection. It displays the names of all the open Microsoft Visio documents in the Immediate window.

 
Public Sub Count_Example() 
 
 Dim intCounter As Integer 
 Dim vsoDocument As Visio.Document 
 
 For intCounter = 1 To Documents.Count 
 'Get the next open document. 
 Set vsoDocument = Documents.Item(intCounter) 
 
 'Print its name in the Immediate window. 
 Debug.Print vsoDocument.Name 
 Next intCounter 
 
End Sub