• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Help needed with worksheet event

Hi

How would I indicate to execute a macro when cell b3 in a worksheet has changed.

B3 is linked to another cell in another worksheet


Private Sub Worksheet_Change(ByVal Target As Range)


If Target.Address = "$A$1" ( here i want to say has changed) Then

run macro

end sub

Any help would be much appreciated!
 
Hi John ,


Please note that a Worksheet_Change event is triggered only when a cell is changed through user input ; when a cell value changes due to a formula , where the precedent cells have changed , then the event procedure will be triggered only if the precedent cells are in the same sheet where the event procedure is present.


Thus , if a Worksheet_Change event procedure has been created for Sheet1 , and suppose you have a formula such as :


=Sheet3!A1


in cell B1 in Sheet1 ; when you change the value of cell A1 in Sheet3 , and consequently , the value of B1 in Sheet1 changes , the Worksheet_Change event procedure will not be triggered.


The same goes for any external links ; any change in the external link will not trigger the Worksheet_Change event procedure.


Probably , you can use the Worksheet_Calculate event procedure , but this does not have a Target parameter , so you will have to use other ways to detect whether your cell of interest has been changed , before you run your relevant macro.


Narayan
 
Back
Top