SheetCalculate Event

Applies To

Application object, Workbook object.

Description

Occurs after any worksheet is recalculated or after any changed data is plotted on a chart.

Syntax

Private Sub object_SheetCalculate(ByVal Sh As Object)

object Application or Workbook.

Sh The sheet. Can be a Chart or Worksheet object.

See Also

Calculate event.

Example

This example sorts the range A1:A100 on worksheet one when any sheet in the workbook is calculated.

Private Sub Workbook_SheetCalculate(ByVal Sh As Object)
    With Worksheets(1)
        .Range("A1:A100").Sort Key1:=.Range("A1")
    End With
End Sub