WorkbookPivotTableOpenConnection Event

Microsoft Excel Visual Basic

Private Sub expression_WorkbookPivotTableOpenConnection(ByVal Wb As Workbook, Target As PivotTable)

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

Wb Required. The selected workbook.

Target    Required. The selected PivotTable report.

Example

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

Private Sub ConnectionApp_WorkbookPivotTableOpenConnection(ByVal wbOne As Workbook, Target As PivotTable)

    MsgBox "The PivotTable connection has been opened."

End Sub