Thursday, December 19, 2013

VBA Tip for the day: Screen Updating

VBA - Screen Updating.

Have you ever created a macro that bounces between spreadsheets and causes the screen to flash because it's trying to keep up with the macro switching worksheets?  Well, there's a quick fix for that:

Option Explicit
Sub StopFlashing()
Application.ScreenUpdating = False

[Your code Here]

Application.ScreenUpdating = True
End Sub

This will not only stop the screen from flashing and causing your users to have seizures, but it will also help to optimize the macro and allow it to run faster!




No comments:

Post a Comment