This documentation is archived and is not being maintained.

Application.WorkbookPivotTableCloseConnection Event

Office 2007
Occurs after a PivotTable report connection has been closed.


expression.WorkbookPivotTableCloseConnection(Wb, Target)

expression   A variable that represents an Application object.


NameRequired/OptionalData TypeDescription
WbRequiredWorkbookThe selected workbook.
TargetRequiredPivotTableThe selected PivotTable report.

Return Value


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.

Visual Basic for Applications
Private Sub ConnectionApp_WorkbookPivotTableCloseConnection(ByVal wbOne As Workbook, Target As PivotTable)

    MsgBox "The PivotTable connection has been closed."

End Sub