I would suggest doing this with an additional hidden sheet, call it timer_lock. Then have a worksheet_change event in every sheet that sets cell A1 of timer_lock equal to 1.
Then use the ontime method to get a macro to check A1 of timer_lock every 2 minutes. If it is 1, set it to 0. If it is 0, close the workbook.
This would look something like this:
In every sheet object module
In a standard module:
Then in your workbook open module:
Out of interest what is the aim of doing this? Implementing this code seems a horrendously bad idea to me.
Bookmarks