Worksheet_change Target Address is Reference Cell

  • Thread starter Thread starter mpreddy
  • Start date Start date
M

mpreddy

Hi
I am using the following code for triggering a macro on cell valu
change.

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$F$1" Then
Call MyMacro
End If
End Sub

This works fine if I change the cell value of F1 directly, but does no
when F1 is linked to another cell, where I make the change. For example
target cell F1 has a formula of "=E1", when I change the value of E1
the macro does not trigger. Even when I assign a Range Name for th
Target cell, this fails to work.
Is there any way out for this ? I appreciate help in this regard

Redd
 
Then you should have your change event occur on the change of E1, not F1.
**** Hope it helps! ****

~Dreamboat
Excel VBA Certification Coming Soon!
www.VBAExpress.com/training/
********************************
 

Ask a Question

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.

Ask a Question

Back
Top