Auto Calculation Toolbar Button
Hey everyone...my next attempt at coding something useful for myself is to try creating a Toolbar button that will set workbook calculation (TOOLS-OPTIONS-CALCULATION) to automatic or manual. I'm trying to avoid going into OPTIONS every time I want to turn Calculation on or off.
Has anyone given this a go yet? I would appreciate any feedback. :cool:
Toggle Auto/ Manual Calculation
Hi,
Don't know if you need help creating the toolbar button or not, but for the code you can use:
Code:
Sub ToggleAutoManualCalc()
With Application
If Not .Calculation = xlManual Then .Calculation = xlManual
Else: .Calculation = xlAutomatic
End With
End Sub
This any help?
Dan
Automatic or Manual Calculation button
Hi BabSc,
Create a new toolbar called "Calcs" with one button on it. Assign it to the following macro. You can swap things around of course. :vv
MD
Code:
Sub ManAuto()
With Application
If .Calculation = xlCalculationManual Then
.Calculation = xlCalculationAutomatic
Set myControl1 = CommandBars("Calcs").Controls(1)
myControl1.State = msoButtonUp
Else
.Calculation = xlCalculationManual
Set myControl1 = CommandBars("Calcs").Controls(1)
myControl1.State = msoButtonDown
End If
End With
End Sub