PublishObject 属性 (Excel)PublishObject.Application property (Excel)

在不使用对象识别符的情况下使用时, 此属性返回代表 Microsoft Excel 应用程序的**Application** 对象。When used without an object qualifier, this property returns an Application object that represents the Microsoft Excel application.

如果与对象识别符一起使用,则此属性返回代表指定对象的创建者的 Application 对象(可以将此属性与 OLE 自动化对象一起使用以返回该对象的应用程序)。When used with an object qualifier, this property returns an Application object that represents the creator of the specified object (you can use this property with an OLE Automation object to return the application of that object). 只读。Read-only.

语法Syntax

表达式应用程序expression.Application

_表达式_一个代表**PublishObject** 对象的变量。expression A variable that represents a PublishObject object.

示例Example

本示例显示一条有关创建 myObject 的应用程序的消息。This example displays a message about the application that created myObject.

Set myObject = ActiveWorkbook 
If myObject.Application.Value = "Microsoft Excel" Then 
 MsgBox "This is an Excel Application object." 
Else 
 MsgBox "This is not an Excel Application object." 
End If

支持和反馈Support and feedback

有关于 Office VBA 或本文档的疑问或反馈?Have questions or feedback about Office VBA or this documentation? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.