會傳回或設定樞紐分析表快取與其資料來源之間的連接方式。 讀取/寫入 XlRobustConnect。
語法
表達。穩健連接
詞 代表 PivotCache 物件的變數。
範例
以下範例將判斷快取連接的設定,並通知使用者。 假設使用中工作表上有一個樞紐分析表。
Sub CheckRobustConnect()
Dim pvtCache As PivotCache
Set pvtCache = Application.ActiveWorkbook.PivotCaches.Item(1)
' Determine the connection robustness and notify user.
Select Case pvtCache.RobustConnect
Case xlAlways
MsgBox "The PivotTable cache is always connected to its source."
Case xlAsRequired
MsgBox "The PivotTable cache is connected to its source as required."
Case xlNever
MsgBox "The PivotTable cache is never connected to its source."
End Select
End Sub
支援和意見反應
有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應。