Export (0) Print
Expand All

WorksheetBase.Calculate Event

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Occurs after the worksheet is recalculated.

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

public event DocEvents_CalculateEventHandler Calculate

The following code example demonstrates a handler for the Calculate event that displays the name of the worksheet when it is calculated.

This example is for a document-level customization.

private void WorksheetCalculate()
{
    this.Calculate += new 
        Excel.DocEvents_CalculateEventHandler(
        Worksheet1_Calculate);
}

void Worksheet1_Calculate()
{
    MessageBox.Show(this.Name + " is being calculated");
}

Show:
© 2014 Microsoft