QP School
Running VBA code when a cell's value changes - Printable Version

+- QP School (https://qomplainerzschool.lima-city.de)
+-- Forum: Tutorials (https://qomplainerzschool.lima-city.de/forumdisplay.php?fid=3)
+--- Forum: Excel VBA Tutorials (https://qomplainerzschool.lima-city.de/forumdisplay.php?fid=48)
+--- Thread: Running VBA code when a cell's value changes (/showthread.php?tid=5229)



Running VBA code when a cell's value changes - Qomplainerz - 07-27-2023

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