PivotCache.OLAP 属性 (Excel)

如果数据透视表缓存与联机分析处理 (OLAP) 服务器相连,则返回 True。 只读 Boolean

语法

表达式Olap

表达 一个代表 PivotCache 对象的变量。

示例

此示例确定缓存连接是否与 OLAP 服务器连接。 本示例假定数据透视表位于活动工作表上。

Sub CheckPivotCache() 
 
 ' Determine if PivotCache has OLAP connection. 
 If Application.ActiveWorkbook.PivotCaches.Item(1).OLAP = True Then 
 MsgBox "The PivotCache is connected to an OLAP server" 
 Else 
 MsgBox "The PivotCache is not connected to an OLAP server." 
 End If 
 
End Sub

支持和反馈

有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。