How can I determine new & previous cell value on SheetChange event in Excel?
Posted
by
Falco Foxburr
on Stack Overflow
See other posts from Stack Overflow
or by Falco Foxburr
Published on 2008-11-17T09:19:28Z
Indexed on
2012/06/03
4:40 UTC
Read the original article
Hit count: 138
I have some special cells in my Excel workbooks which are managed by my Excel Add-in. I want to prevent users from changing content of those cells, but I also want to know, what value users wanted to enter to those cells. On the SheetChange event I can check what users entered to my special cells, but how do I determine the PREVIOUS value in those cells and REVERT user changes?
It is not a solution for me. If I lock cell in Excel, it becomes read-only - user can not even try to enter anything to this cell - Excel popups warning dialog in this case. My problem is that I want to catch what user entered to my cell, do something with this value, and then revert cell content to original value.
© Stack Overflow or respective owner