다음을 통해 공유


WorkbookBase.SheetPivotTableUpdate Event

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

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

Syntax

'Declaration
Public Event SheetPivotTableUpdate As WorkbookEvents_SheetPivotTableUpdateEventHandler
public event WorkbookEvents_SheetPivotTableUpdateEventHandler SheetPivotTableUpdate

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

WorkbookBase Class

Microsoft.Office.Tools.Excel Namespace