Excel Tip – Improve the speed of VBA Macros with Screenupdating

If you write Macros in Microsoft Excel to automate tasks you need to learn about ScreenUpdating.  This one feature has saved me hours of Macro running time over the years.

By default when you run a macro Excel will still update the users screen everytime the macro makes a change, this can make some macros run extremely slow as the screen has to refresh after every change.

To solve this at the start of your macro switch off screen updating with the line –

 

Sub Examplemacro ()

Application.ScreenUpdating = False

Then at the end of your macro switch screen updating back on

Application.ScreenUpdating = True

End Sub

This will speed up your macro no end!

I hope this was helpful – if so please leave a comment, having crawled the web for Excel hints and tips over the years, I thought it was time to give something back and share the tricks I find most useful.

Add a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.