如果不使用对象识别符,则该属性返回一个 Application 对象,该对象代表 Microsoft Excel 应用程序。如果使用对象识别符,则该属性返回一个代表指定对象(可对一个 OLE 自动操作对象使用本属性来返回该对象的应用程序)创建者的 Application 对象。只读。
expression.Application
expression 必需。该表达式返回上面的对象之一。
本示例显示一个有关创建 myObject
的应用程序的信息。
Set myObject = ActiveWorkbook
If myObject.Application.Value = "Microsoft Excel" Then
MsgBox "This is a Microsoft Excel object"
Else
MsgBox "This is not a Microsoft Excel object"
End If