This article will demonstrate the use of VBA Target.Address.
This event is triggered when you move from one cell to another in your worksheet.
To create a Worksheet Event, on the VBE Editor, select the appropriate worksheet and then, in the Object drop down box, select Worksheet.
Consider the following code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Target.Address = "$F$2" Then Range(Target.Address).Font.Bold = True End If End Sub
NOTE: The Target.Address is an absolute ($F$2), so when checking to see if you are on the appropriate cell, you must use $ signs in your string (“$F$2”).
The Target Range (and therefore the Target.Address method) is also avaialable with the Worksheet_Change; Worksheet_BeforeDoubleClick and Worksheet_BeforeRightClick event procedures in your Worksheet object.