Increase Macro Speed
Sub Speed_Up_Performance()
Set_Performance_Options
' Use Early Binding Instead of late binding
' Do not use Variant if you can use Long, String data types
' If you want to loop through the documents/workbooks use For each
For Each Doc In Documents
' Do something
Next Doc
ReSet_Performance_Options
End Sub
Function Set_Performance_Options()
' If an updated cell value is necessary for the macro. Then either do not use this or used forced calculation using calculate method
Application.Calculation = xlCalculationManual
Application.ScreenUpdating = False
End Function
Function ReSet_Performance_Options()
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True
End Function
' ScreenUpdating, Calculation, Early Binding, late binding, Speedup VBA Performance, Optimize VBA Code, Visual Basic Code Optimization
Showing posts with label Visual Basic Code Optimization. Show all posts
Showing posts with label Visual Basic Code Optimization. Show all posts
Monday, April 30, 2007
Subscribe to:
Posts (Atom)
Download Windows Live Toolbar and personalize your Web experience! Add custom buttons to get the information you care about most.