Created
June 24, 2013 16:43
-
-
Save jakelosh/5851519 to your computer and use it in GitHub Desktop.
This is a sub I wrote to turn off certain application features in Excel that I often toggle while running scripts. You feed it a bool and it toggles accordingly.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Public Sub OffAutos(ByVal bolState As Boolean) | |
If bolState = True Then | |
With Application | |
.Calculation = xlCalculationManual | |
.ScreenUpdating = False | |
.DisplayAlerts = False | |
.AskToUpdateLinks = False | |
End With | |
Else | |
With Application | |
.Calculation = xlCalculationAutomatic | |
.ScreenUpdating = True | |
.DisplayAlerts = True | |
.AskToUpdateLinks = True | |
End With | |
End If | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment