PivotTableCloseConnection Event [Excel 2003 VBA Language Reference]

Occurs after a PivotTable report closes the connection to its data source.

Private Subexpression**_PivotTableCloseConnection**(ByVal Target As PivotTable)

expression A variable which references an object of type Workbook declared with events in a class module.

Target Required. The selected PivotTable report.

Example

This example displays a message stating that the PivotTable report's connection to its source has been closed. This example assumes you have declared an object of type Workbook with events in a class module.

Private Sub ConnectionApp_PivotTableCloseConnection(ByVal Target As PivotTable)

    MsgBox "The PivotTable connection has been closed."

End Sub

Applies to | Workbook Object