UISetup + UIRestore

Simple way to freeze UI in Excel-VBA then restore it after complete in standard method.
I put those in every project as only method to freeze Excel window (and calculations) while macro is running in background for speeding.
Then after I am done, I restore everything up for user.
I call them only in main commands, mostly long processed commands that needs CPU.

CodeFunctionName
What is this?

Public

Tested

Original Work
Sub UISetup()
    Application.Calculation = xlCalculationManual
    Application.ScreenUpdating = False
    Application.EnableEvents = False
End Sub
Sub UIRestore()
    Application.Calculation = xlCalculationAutomatic
    Application.ScreenUpdating = True
    Application.EnableEvents = True
End Sub

N/A

Views 87

Downloads 29

CodeID
DB ID