Skip to content

Latest commit

 

History

History
54 lines (33 loc) · 1.12 KB

Visio.OLEObjects.Count.md

File metadata and controls

54 lines (33 loc) · 1.12 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
OLEObjects.Count property (Visio)
vis_sdr.chm15113330
vis_sdr.chm15113330
Visio.OLEObjects.Count
5c3146b2-e2cf-165d-8432-e44b1da1593a
06/08/2017
medium

OLEObjects.Count property (Visio)

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

Syntax

expression.Count

expression A variable that represents an OLEObjects object.

Return value

Long

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

[!includeSupport and feedback]