title | keywords | f1_keywords | ms.assetid | ms.date | ms.localizationpriority | |
---|---|---|---|---|---|---|
Workbook.PivotTableCloseConnection event (Excel) |
vbaxl10.chm503094 |
|
e267ab5b-382e-b270-18c8-f643e03e4604 |
05/29/2019 |
medium |
Occurs after a PivotTable report closes the connection to its data source.
expression.PivotTableCloseConnection (Target)
expression A variable that represents a Workbook object.
Name | Required/Optional | Data type | Description |
---|---|---|---|
Target | Required | PivotTable | The selected PivotTable report. |
Nothing
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
[!includeSupport and feedback]