Can I run a VBA function whenever excel calculates, even when I don't click F9?

This is a followup question to this one: Can I make Excel beep when a calculation is finished?

The answer relies on me pressing F9.

However, even with calculations on manual, sometimes calculations happen without F9 - e.g. when I save the document.

Is there any event that I can use when a calculation happens regardless of what initiated it?


Solution 1:

Check out the Worksheet event Worksheet_Calculate or the Workbook event Workbook_SheetCalculate
It's easy for those to start firing infinite loops, though, so be careful