Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The following simple routines turn off/on Auto Calc
Sub AutoCalcOff() With Application .Calculation = xlManual .MaxChange = 0.001 End With ActiveWorkbook.PrecisionAsDisplayed = False End Sub Sub AutoCalcOn() With Application .Calculation = xlAutomatic .MaxChange = 0.001 End With ActiveWorkbook.PrecisionAsDisplayed = False End Sub How can I combine the 2 and toggle between on and off with a shortcut key...Unless of course this is built into Excel already. I know If I switch to manual that F9 will recalc but I want to be able to turn off and on via shortcut key. And a recalc when It is turned on would be nice too :-) Thanks! |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
One way:
Assign this to your shortcut key: Public Sub ToggleCalc() ActiveWorkbook.PrecisionAsDisplayed = False With Application If .Calculation = xlCalculationManual Then .Calculation = xlCalculationAutomatic Else .Calculation = xlCalculationManual .MaxChange = 0.001 End If End With End Sub Setting Calculation to automatic will automatically recalc. In article , "Sandy" wrote: The following simple routines turn off/on Auto Calc Sub AutoCalcOff() With Application .Calculation = xlManual .MaxChange = 0.001 End With ActiveWorkbook.PrecisionAsDisplayed = False End Sub Sub AutoCalcOn() With Application .Calculation = xlAutomatic .MaxChange = 0.001 End With ActiveWorkbook.PrecisionAsDisplayed = False End Sub How can I combine the 2 and toggle between on and off with a shortcut key...Unless of course this is built into Excel already. I know If I switch to manual that F9 will recalc but I want to be able to turn off and on via shortcut key. And a recalc when It is turned on would be nice too :-) Thanks! |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you!
"JE McGimpsey" wrote: One way: Assign this to your shortcut key: Public Sub ToggleCalc() ActiveWorkbook.PrecisionAsDisplayed = False With Application If .Calculation = xlCalculationManual Then .Calculation = xlCalculationAutomatic Else .Calculation = xlCalculationManual .MaxChange = 0.001 End If End With End Sub Setting Calculation to automatic will automatically recalc. In article , "Sandy" wrote: The following simple routines turn off/on Auto Calc Sub AutoCalcOff() With Application .Calculation = xlManual .MaxChange = 0.001 End With ActiveWorkbook.PrecisionAsDisplayed = False End Sub Sub AutoCalcOn() With Application .Calculation = xlAutomatic .MaxChange = 0.001 End With ActiveWorkbook.PrecisionAsDisplayed = False End Sub How can I combine the 2 and toggle between on and off with a shortcut key...Unless of course this is built into Excel already. I know If I switch to manual that F9 will recalc but I want to be able to turn off and on via shortcut key. And a recalc when It is turned on would be nice too :-) Thanks! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
AutoCalc | Excel Discussion (Misc queries) | |||
Links not updating - autocalc is on | Excel Discussion (Misc queries) | |||
MS excel incorrect autocalc? | Excel Worksheet Functions | |||
autocalc to complicated to turn off | Setting up and Configuration of Excel | |||
turn off autocalc | Excel Programming |