PivotCache.OLAP Property

Excel Developer Reference

Returns True if the PivotTable cache is connected to an Online Analytical Processing (OLAP) server. Read-onlyBoolean.

Syntax

expression.OLAP

expression   A variable that represents a PivotCache object.

Example

This example determines whether or not the cache connection is to an OLAP server. The example assumes that a PivotTable exists on the active worksheet.

Visual Basic for Applications
  Sub CheckPivotCache()
' Determine if PivotCache has OLAP connection.
If Application.ActiveWorkbook.PivotCaches.Item(1).<strong class="bterm">OLAP</strong> = 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

See Also