Professional Documents
Culture Documents
wellsrPRO community. These
subroutines can dramatically increase the speed of your VBA macros by
Reader’s Note: This is the second article in a new series featuring macros submitted by
my incredible wellsrPRO community members. These articles are similar to my Code
Library articles in that they usually won’t contain an accompanying detailed tutorial.
wellsrPRO users can automatically import this community submission directly into their
spreadsheet. Just look for “Community Submissions” in the Auto-Import dropdown menu.
Like Jomili says in his comment, the macro above turns off time wasters that may slow
down your VBA code. To turn them back on, use the following macro:
Return to Defaults
Created by Jomili
Sub SpeedOff()
'Turns on the time wasters
With Application
.Calculation = xlCalculationAutomatic
.ScreenUpdating = True
.EnableEvents = True
.DisplayAlerts = True
.Cursor = xlDefault
.StatusBar = False
.EnableCancelKey = xlInterrupt
End With
End Sub
You can adapt these codes to disable and enable other application features that may be
slowing down your macro.
Sub ReallySlowMacro()
Call SpeedOn
'
'
'
' Your really slow macro goes here
'
'
'
Call SpeedOff
End Sub
Reach out to my VBA Consulting page if you have questions and I’ll be happy to help you
out!
If you’re ready to free up your time in the office, visit my Excel Add-ins page for some great
automation products.