Condividi tramite


WorksheetBase.PivotTableUpdate Event

Definition

Occurs after a PivotTable report is updated on a worksheet.

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

Event Type

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.

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.");
}
Sub Worksheet1_PivotTableUpdate(ByVal Target As Excel.PivotTable) _
    Handles Me.PivotTableUpdate
    MsgBox("The PivotTable connection has been updated.")
End Sub

Applies to