I'll assume you're working on Excel's VBA. Simply, in the VBA code area; Go to your Project Window, expand the workbook's project, double clic the worksheet you want to triger the event.
In the upper left menu of the code area, select Worksheet instead of General. Then in the upper right menu of the code area, select the event you want to handle (perhaps 'Selection Change'), and write your code there, something like:
- Private Sub Worksheet_SelectionChange(ByVal Target As Range)
-
If Target.Row = 1 And Target.Column = 1 Then MsgBox ("Selected row is A1")
-
End Sub
HTH