SheetChange Event

Microsoft Excel Visual Basic

Occurs when cells in any worksheet are changed by the user or by an external link.

Private Sub object_SheetChange(ByVal Sh As Object, ByVal Source As Range)

object    Application or Workbook. For more information about using events with the Application object, see Using Events with the Application Object.

Sh    A Worksheet object that represents the sheet.

Source    The changed range.

Remarks

This event doesn't occur on chart sheets.

Example

This example runs when any worksheet is changed.

Private Sub Workbook_SheetChange(ByVal Sh As Object, _
        ByVal Source As Range)
    ' runs when a sheet is changed
End Sub