Workbook.SheetCalculate event (Excel)

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

Syntax

expression.SheetCalculate (Sh)

expression An expression that returns a Workbook object.

Parameters

Name Required/Optional Data type Description
Sh Required Object Can be a Chart or Worksheet object.

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

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.