PivotCache.RobustConnect 属性 (Excel)

返回或设置数据透视表缓存与其数据源连接的方式。 XlRobustConnect 类型,可读写。

语法

表达式RobustConnect

表达 一个代表 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 支持和反馈,获取有关如何接收支持和提供反馈的指南。