GreenyMcDuff
Active Member
- Joined
- Sep 20, 2010
- Messages
- 313
Hi all,
This seems like a really easy question but I can't find an answer on google
I am using this code
To start my macro when someone clicks on Cell H2.
This code has to be maintained in a module and so I now need the macro to run when Cell H2 is click in the Worksheet "Data" only.
I figured using this would work:
But it does not,
Thanks for all your help :D
Chris
This seems like a really easy question but I can't find an answer on google
I am using this code
Code:
Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = "$H$2" Then
Run
MsgBox ("Report Compiled Successfully")
End If
End Sub
To start my macro when someone clicks on Cell H2.
This code has to be maintained in a module and so I now need the macro to run when Cell H2 is click in the Worksheet "Data" only.
I figured using this would work:
Code:
Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = "[COLOR=red]Data![/COLOR]$H$2" Then
Run
MsgBox ("Report Compiled Successfully")
End If
End Sub
But it does not,
Thanks for all your help :D
Chris
Last edited: