Compartir a través de


WorksheetBase.PivotTableUpdate Event

Occurs after a PivotTable report is updated on a worksheet.

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 PivotTableUpdate As DocEvents_PivotTableUpdateEventHandler
public event DocEvents_PivotTableUpdateEventHandler PivotTableUpdate

Examples

The following code example demonstrates a handler for the PivotTableUpdate event that displays a message when a PivotTable report has been updated.

This example is for a document-level customization.

Sub Worksheet1_PivotTableUpdate(ByVal Target As Excel.PivotTable) _
    Handles Me.PivotTableUpdate
    MsgBox("The PivotTable connection has been updated.")
End Sub
private void WorksheetPivotTableUpdate()
{
    this.PivotTableUpdate += 
        new Excel.DocEvents_PivotTableUpdateEventHandler(
        Worksheet1_PivotTableUpdate);
}

void Worksheet1_PivotTableUpdate(Excel.PivotTable Target)
{
    MessageBox.Show("The PivotTable connection has been updated.");
}

.NET Framework Security

See Also

Reference

WorksheetBase Class

Microsoft.Office.Tools.Excel Namespace