Table of contents
TOC
折叠目录
展开目录

Cell.Stat 属性 (Visio)Cell.Stat Property (Visio)

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

返回对象的状态信息。只读。Returns status information for an object. Read-only.

语法Syntax

表达式启动expression . Stat

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

返回值Return Value

IntegerInteger

注解Remarks

如果对象是对文档中的实体的引用,该文档关闭, Stat属性的返回的值在其中设置了visStatClosed位。If an object is a reference to an entity in a document, and if that document closes, the Stat property returns a value in which the visStatClosed bit is set.

如果对象已被删除的实体的引用, Stat属性返回的值在其中设置了visStatDeleted位。If an object is a reference to an entity that has been deleted, the Stat property returns a value in which the visStatDeleted bit is set.

组件对象模型 (COM) 对象,如 Microsoft Visio文档对象,生存之地,只要持有 (尖到) 客户端,即使该对象在逻辑上是处于已删除或已关闭状态。A Component Object Model (COM) object, such as a Microsoft Visio Document object, lives as long as it is held (pointed to) by a client, even if the object is logically in a deleted or closed state.

示例Example

此 Microsoft Visual Basic for Applications (VBA) 宏显示如何使用Stat属性来检查文档对象的状态。执行该宏输出 0 ( visStatNormal ),然后在即时窗口中的 8 ( visStatClosed )。This Microsoft Visual Basic for Applications (VBA) macro shows how to use the Stat property to check the status of a Document object. Executing the macro prints 0 ( visStatNormal ) and then 8 ( visStatClosed ) in the Immediate window.


Public Sub Stat_Example() 

 Dim vsoDocument As Visio.Document 
 Set vsoDocument = Documents.Add("") 
 Debug.Print vsoDocument.Stat 
 vsoDocument.Close 
 Debug.Print vsoDocument.Stat 

End Sub
© 2018 Microsoft