ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Event for CalcState? (https://www.excelbanter.com/excel-programming/362735-event-calcstate.html)

M. Authement

Event for CalcState?
 
I have written some code to provide a right-click shortcut to toggle
Auto/Manual calculation modes. This code changes the State property on the
menu to provide a check mark if Manual calculation is on. This all works
fine, but how would I know if someone used the 'normal'
Tools/Options/Calculation to change calculation modes (and therefore be able
to update my menu item)? I looked at Application Events but didn't think
any of them would trigger based on changing calculation modes. Is there a
way to accomplish this? I am using XP SP2 and XL2003. Thanks in advance
for any help provided.



Charles Williams

Event for CalcState?
 
There is no event that is always triggered by changing calculation modes. If
you change from manual to automatic a calculate event is fired, but the
opposite is not true, therefore there is no perfect solution.
You can check by looking at Application.calculation whether
someone/something had changed it: you just have to decide which events to
use to do the check.

Charles
______________________
Decision Models
FastExcel 2.2 Beta now available
www.DecisionModels.com

"M. Authement" wrote in message
...
I have written some code to provide a right-click shortcut to toggle
Auto/Manual calculation modes. This code changes the State property on the
menu to provide a check mark if Manual calculation is on. This all works
fine, but how would I know if someone used the 'normal'
Tools/Options/Calculation to change calculation modes (and therefore be
able to update my menu item)? I looked at Application Events but didn't
think any of them would trigger based on changing calculation modes. Is
there a way to accomplish this? I am using XP SP2 and XL2003. Thanks in
advance for any help provided.




M. Authement

Event for CalcState?
 
Thanks Charles. It wasn't what I was hoping to hear, but I was kind of
expecting to hear it.


"Charles Williams" wrote in message
...
There is no event that is always triggered by changing calculation modes.
If you change from manual to automatic a calculate event is fired, but the
opposite is not true, therefore there is no perfect solution.
You can check by looking at Application.calculation whether
someone/something had changed it: you just have to decide which events to
use to do the check.

Charles
______________________
Decision Models
FastExcel 2.2 Beta now available
www.DecisionModels.com

"M. Authement" wrote in message
...
I have written some code to provide a right-click shortcut to toggle
Auto/Manual calculation modes. This code changes the State property on
the menu to provide a check mark if Manual calculation is on. This all
works fine, but how would I know if someone used the 'normal'
Tools/Options/Calculation to change calculation modes (and therefore be
able to update my menu item)? I looked at Application Events but didn't
think any of them would trigger based on changing calculation modes. Is
there a way to accomplish this? I am using XP SP2 and XL2003. Thanks in
advance for any help provided.







All times are GMT +1. The time now is 10:02 AM.

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