The following macro lines will, respectively, turn off screen updating and then turn it back on in a VBA macro.The idea is to use the first line near the beginning of your macro, and then use the second line near the end.

excel turn off screenupdating-46

When I started reading more into improving the efficiency of your code I understood what it was for but how much of an effect does Turning off screen updating will only make a difference to execution time if the code interacts with Excel in a way that causes changes to the screen content.

The grater the amount of screen changes the bigger the impact will be. Other application settings that can make a difference to execution time are Calculation and Event handling. Enable Events = False ' Code here Clean Up: On Error Resume Next Application. Calculation = xl Calculation Automatic Application. Enable Events = True Exit Sub EH: ' Do error handling Go To Clean Up End Sub Sub test Screen Updating() Dim i As Integer Dim numb Switches As Integer Dim results As String 'swap between sheets this number of times numb Switches = 1000 'keep track of time Dim start Time As Double start Time = Time 'swap between sheets 1/2 (need both sheets or this will crash) For i = 1 To numb Switches Sheets(1 (i Mod 2)).

Some of the most asked questions that can be (or have been) solved by using ASAP Utilities.

In the "Info..." option in ASAP Utilities you can find the same brief description of each tool.

Many people write their own macros to manipulate the information in a workbook.

Many times the macro may do quite a bit with the data, such as selecting different cells, replacing values or formulas, and taking other types of actions.Thus, the main body of your macro can do its work behind the scenes without the necessity of stopping to update the screen.is your source for cost-effective Microsoft Excel training.This tip (2498) applies to Microsoft Excel 97, 2000, 2002, and 2003.You can find a version of this tip for the ribbon interface of Excel (Excel 2007 and later) here: Turning Off Screen Updating.From my own test I find out that turning screen updating off and on takes about 15ms (tested in C# via Excel Interop).