Share via


WorkbookBase.SheetPivotTableUpdate Event

Definition

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

public:
 event Microsoft::Office::Interop::Excel::WorkbookEvents_SheetPivotTableUpdateEventHandler ^ SheetPivotTableUpdate;
public event Microsoft.Office.Interop.Excel.WorkbookEvents_SheetPivotTableUpdateEventHandler SheetPivotTableUpdate;
member this.SheetPivotTableUpdate : Microsoft.Office.Interop.Excel.WorkbookEvents_SheetPivotTableUpdateEventHandler 
Public Custom Event SheetPivotTableUpdate As WorkbookEvents_SheetPivotTableUpdateEventHandler 

Event Type

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.

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.");
}
Sub ThisWorkbook_SheetPivotTableUpdate(ByVal Sh As Object, _
    ByVal Target As Excel.PivotTable) _
    Handles Me.SheetPivotTableUpdate

    MsgBox("The PivotTable connection was updated.")
End Sub

Applies to