Private Sub Worksheet_Change(ByVal Target as Range)
Target.Font.ColorIndex = 5
End Sub
Occurs when cells on the worksheet are changed by the user or by an external link.
Syntax
Private Sub Worksheet_Change(ByVal Target As Range)
Target The changed range. Can be more than one cell.
Remarks
This event doesn't occur when cells change during a recalculation. Use the Calculate event to trap a sheet recalculation.
Deleting cells doesn't trigger this event.
------------------------------------------------------------
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
Occurs when cells in any worksheet are changed by the user or by an external link.
Syntax
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.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.