Share via


Workbook.SheetPivotTableUpdate Event (2007 System)

Occurs after the sheet of a PivotTable report has been updated.

Namespace:  Microsoft.Office.Tools.Excel
Assembly:  Microsoft.Office.Tools.Excel.v9.0 (in Microsoft.Office.Tools.Excel.v9.0.dll)

Syntax

'Declaration
Public Event SheetPivotTableUpdate As WorkbookEvents_SheetPivotTableUpdateEventHandler
'Usage
Dim instance As Workbook 
Dim handler As WorkbookEvents_SheetPivotTableUpdateEventHandler 

AddHandler instance.SheetPivotTableUpdate, handler
public event WorkbookEvents_SheetPivotTableUpdateEventHandler SheetPivotTableUpdate
public:
 event WorkbookEvents_SheetPivotTableUpdateEventHandler^ SheetPivotTableUpdate {
    void add (WorkbookEvents_SheetPivotTableUpdateEventHandler^ value);
    void remove (WorkbookEvents_SheetPivotTableUpdateEventHandler^ value);
}
JScript does not support events.

Examples

The following code example demonstrates a handler for the SheetPivotTableUpdate event. The event handler displays a message when the sheet of a PivotTable report has been updated.

This example is for a document-level customization.

Sub ThisWorkbook_SheetPivotTableUpdate(ByVal Sh As Object, _
    ByVal Target As Excel.PivotTable) _
    Handles Me.SheetPivotTableUpdate

    MsgBox("The PivotTable connection was updated.")
End Sub
private void WorkbookSheetPivotTableUpdate()
{
    this.SheetPivotTableUpdate +=
        new Excel.WorkbookEvents_SheetPivotTableUpdateEventHandler(
        ThisWorkbook_SheetPivotTableUpdate);
}

void ThisWorkbook_SheetPivotTableUpdate(object Sh,
    Excel.PivotTable Target)
{
    MessageBox.Show("The PivotTable connection was updated.");
}

.NET Framework Security

See Also

Reference

Workbook Class

Workbook Members

Microsoft.Office.Tools.Excel Namespace