What code do in need to run a macro any time the value of a cell changes?
What code do in need to run a macro any time the value of a cell changes?
Last edited by Pony08; 01-05-2016 at 03:26 PM.
You could try something like this perhaps
Alf![]()
Please Login or Register to view this content.
Thx! That works well if I type in a new number...I have a macro that I want to run if a cells that has a formula in it...and the results from the formula changes...I think the fact that the formula stays the same, the macro will not run until I overwrite the formula with just a number.
Thoughts?
Well if the change is based on a formula then you could try this:
Right click on the sheet tab where the cell is you want to capture a change in. Click "View Code" and paste this code in the window. Say it's sheet1
Then to the left in the Visual Basic Window you see a number of work sheets and "ThisWorkbook".![]()
Please Login or Register to view this content.
Right click on "ThisWorkbook" and paste this code in the new window.
Save file and open it again. Now try to update you formula target cell and see if macro runs.![]()
Please Login or Register to view this content.
Alf
That worked great Alf...thanks for all your help!!!
You are welcome.
Thanks for feedback.
Alf
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks