ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   check if excel sheet in manual calc mode (https://www.excelbanter.com/excel-programming/404799-check-if-excel-sheet-manual-calc-mode.html)

dan

check if excel sheet in manual calc mode
 
Is it possible to check all the time if a sheet has by mistake been switched
to manual calc?

I have tried the below but obviously not working as when we are in Manual
calc no calc is done to triger the volatility of the function.

Function MyCalcStatus()
Application.Volatile
If Application.Calculation = -4105 Then MyCalcStatus = "Auto"
If Application.Calculation = -4135 Then MyCalcStatus = "Manual"
End Function


Many thanks,
Dan

ilia

check if excel sheet in manual calc mode
 
Could use either change or selection_change worksheet events. Also,
you can use these two constants, for better readability:

Application.Calculation = Excel.xlCalculationAutomatic
Application.Calculation = Excel.xlCalculationManual


On Jan 22, 8:44*pm, Dan wrote:
Is it possible to check all the time if a sheet has by mistake been switched
to manual calc?

I have tried the below but obviously not working as when we are in Manual
calc no calc is done to triger the volatility of the function.

Function MyCalcStatus()
*Application.Volatile
*If Application.Calculation = -4105 Then MyCalcStatus = "Auto"
*If Application.Calculation = -4135 Then MyCalcStatus = "Manual"
End Function

Many thanks,
Dan




All times are GMT +1. The time now is 09:38 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com