Table of contents

MasterShortcuts.Count 属性 (Visio)MasterShortcuts.Count Property (Visio)

office 365 dev account|上次更新日期: 2018/3/13
2 参与人员

返回集合中对象的数目。只读。Returns the number of objects in a collection. Read-only.


表达式计数expression . Count

表达式_一个表示MasterShortcuts对象的变量。_expression A variable that represents a MasterShortcuts object.

返回值Return Value



此 Microsoft Visual Basic for Applications (VBA) 宏显示如何使用Count属性循环访问文档集合。在即时窗口中显示所有打开 Microsoft Visio 文档的名称。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
© 2018 Microsoft