Udostępnij za pośrednictwem


Worksheet.PivotTableUpdate Event (2007 System)

Occurs after a PivotTable report is updated on a worksheet.

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

Syntax

'Declaration
Public Event PivotTableUpdate As DocEvents_PivotTableUpdateEventHandler
'Usage
Dim instance As Worksheet 
Dim handler As DocEvents_PivotTableUpdateEventHandler 

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

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

Worksheet Class

Worksheet Members

Microsoft.Office.Tools.Excel Namespace