Hi Forum,
I am trying to figure out how to refer to a cell when using a simple If statement.
The code below runs the message whenever I change the value of any cell.
I am trying to set it up so that it only applies to cell A2.
At present it seems to ignore the If. I suspect that I am not refering to cell A2 properly.
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells <> "A2" Then Exit Sub
MsgBox "A2 Changed"
End Sub
Can anyone help, please?
Thanks very much
Dave
Bookmarks