AppEvents_Event.AfterCalculate Event
The AfterCalculate event occurs when all pending refresh activity (both synchronous and asynchronous) and all of the resultant calculation activities have been completed.
Namespace: Microsoft.Office.Interop.Excel
Assembly: Microsoft.Office.Interop.Excel (in Microsoft.Office.Interop.Excel.dll)
Syntax
'Declaration
Event AfterCalculate As AppEvents_AfterCalculateEventHandler
'Usage
Dim instance As AppEvents_Event
Dim handler As AppEvents_AfterCalculateEventHandler
AddHandler instance.AfterCalculate, handler
event AppEvents_AfterCalculateEventHandler AfterCalculate
Remarks
This event occurs whenever calculation is completed and there are no outstanding queries. It is mandatory for both conditions to be met before the event occurs. The event can be raised even when there is no sheet data in the workbook, such as whenever calculation finishes for the entire workbook and there are no queries running.
Add-in developers use the AfterCalculate event to know when all the data in the workbook has been fully updated by any queries and/or calculations that may have been in progress.
This event occurs after all Calculate, AfterRefresh, and SheetChange events. It is the last event to occur after all refresh processing and all calc processing have completed, and it occurs afterCalculationState is set to xlDone.