Workbook.PivotTableCloseConnection event (Excel)
Occurs after a PivotTable report closes the connection to its data source.
expression A variable that represents a Workbook object.
|Target||Required||PivotTable||The selected PivotTable report.|
This example displays a message stating that the PivotTable report's connection to its source has been closed. This example assumes that 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
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.