Changing non-Boolean settings | VBA Excel @ ExcelOptimize.Com
Sub ToggleCalcMode()
Select Case Application.Calculation
Case xlManual
Application.Calculation =
xlCalculationAutomatic
MsgBox “Automatic Calculation Mode”
Case xlAutomatic
Application.Calculation = xlCalculationManual
MsgBox “Manual Calculation Mode”
End Select
End Sub
You can adapt this technique for changing other non-Boolean settings.

This post placed under VBA Excel , Excel, non-boolean, setting, VBA code by Andrian
Top incoming search terms for this post
You might wanna see also these VBA Excel :
Preventing Users from Inserting More Worksheets -
Preventing Users from Printing a Workbook -
Preventing Save As in a Workbook -
Loading Add-ins Automatically -
Do-Until loop -
Do-While loop -
Nested For-Next -

Leave a Reply