QP School

Full Version: Running VBA code when a cell's value changes
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Description:

You can write code that runs when a cell's value changes.

Example:

Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Address = "$A$1" Then
        MsgBox "Cell A1 value changed to: " & Target.Value
    End If
End Sub