Try the following sub which you put into the worksheet where the cell
is:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not (Intersect(Target, Range("E5")) Is Nothing) Then
MsgBox "E5 was selected"
End If
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = "$H$1" Then
Call MyMacro
End If
End Sub
'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.