Skip to content

Instantly share code, notes, and snippets.

@danwagnerco
Created July 12, 2014 21:56
Show Gist options
  • Save danwagnerco/a1cfc39d7e716e0cc945 to your computer and use it in GitHub Desktop.
Save danwagnerco/a1cfc39d7e716e0cc945 to your computer and use it in GitHub Desktop.
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'INPUT : True or False (i.e. fast or slow)
'DESCRIPTION : this sub turns off screen updating and alarms then
' sets calculations to manual
'
Public Sub GoFast(OnOrOff As Boolean)
Dim CalcMode As XlCalculation
CalcMode = Application.Calculation
With Application
.ScreenUpdating = Not OnOrOff
.EnableEvents = Not OnOrOff
.DisplayAlerts = Not OnOrOff
If OnOrOff Then
.Calculation = xlCalculationManual
Else
.Calculation = CalcMode
End If
End With
End Sub
@ExcelTitan
Copy link

Noice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment