PDA

View Full Version : target.address help.



wilg
03-10-2011, 03:36 PM
Hi I have a sheet in which when I press delete in a specific cell "ap5" I want to clear contents in "as2" which will trigger another code. I am having a issue with this any suggestions? I would like to put this into worksheet change event.

Thanks in advance.

Bob Phillips
03-10-2011, 04:23 PM
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$M$2" Then

If Target.Value = "" Then

MsgBox "hello"
End If
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.