PivotTableCloseConnection 事件

       

发生在数据透视表关闭与其数据源的连接之后。

Private Sub expression_PivotTableCloseConnection(ByVal Target As PivotTable)

expression   引用在类模块中带有事件声明的 Workbook 类型对象的变量。

Target   必需。选定的数据透视表。

示例

本示例显示一则消息,说明数据透视表与其数据源的连接已经关闭。本示例假定您已在类模块中声明了带有事件的 Workbook 类型的对象。

Private Sub ConnectionApp_PivotTableCloseConnection(ByVal Target As PivotTable)

    MsgBox "The PivotTable connection has been closed."

End Sub