Worksheet Change Event to Run a Macro

How to run a macro on worksheet change event like a change in selection in a drop-down list created using data validation. First we create a drop-down list using data validation. Now when we select a name from the drop-down list a macro is executed because we linked the target cell address with the macro. Watch the video and then study the VBA code:

Watch this video on YouTube.

Here’s the complete VBA code:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = “$A$2” Then

Select Case Target.Value

Case “Harry”
Call Harry

Case “Dinesh”
Call Dinesh

Case “Rajan”
Call Rajan

Case “Laura”
Call Laura

Case “Faizal”
Call Faizal

End Select

End If
End Sub

The Target is the Range ($A$2) which has the data of names in a drop-down list. As soon as the user selects a name it triggers an action, i. e. fires up the relevant macro,

Further reading:

Worksheet Change