ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   manual/auto calculation toggle button (https://www.excelbanter.com/excel-programming/402038-manual-auto-calculation-toggle-button.html)

scott[_12_]

manual/auto calculation toggle button
 
I have an addin for a toolbar to toggle calculation on and off.

Everything works fine.
I am tracking the current status by checking everytime the
TrackEvent_SheetChange fires.
I do have people who have written macros that turn off calculation and
never set it back, or they change it manually.

I want this toggle button to always reflect the current state of auto
or manual, so if something has changed I want the button to
auto-update itself.
Everything works, I only wonder if there is another approach to check
the status, than firing on the TrackEvent_SheetChange.

Thanks,
Scott Denton




M. Authement

manual/auto calculation toggle button
 
There is no fool-proof way to detect this change, but I did it by setting up
a class that monitors the selection of Tools | Options command, then use the
OnTime event to update the status of calculation mode after some period of
time (I actually fire two OnTime commands, one at 5 sec and one at 30 sec
for those that take more time to find/change the setting or get distracted).
I don't know how you would detect a change from another macro unless you
continually ran an OnTime routine.


"scott" wrote in message
...
I have an addin for a toolbar to toggle calculation on and off.

Everything works fine.
I am tracking the current status by checking everytime the
TrackEvent_SheetChange fires.
I do have people who have written macros that turn off calculation and
never set it back, or they change it manually.

I want this toggle button to always reflect the current state of auto
or manual, so if something has changed I want the button to
auto-update itself.
Everything works, I only wonder if there is another approach to check
the status, than firing on the TrackEvent_SheetChange.

Thanks,
Scott Denton







All times are GMT +1. The time now is 08:24 AM.

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