Ms excel screen updating


I have changed it slightly so it loops 10,000 times and I execute it 10 times for sample size.

ms excel screen updating-73

When we set Screen Updating property of an application object to false then it will speed up the macro. Please find the below example for Screen Updating Property of an application object in excel VBA.

Explanation: In the above example, it will display numbers from 1 to 100 in the first column on Sheet1.

While Excel will set this back to True whenever focus is passed back to Excel (your macro finishes) in most cases, it pays to play it safe and include the code at the end.

You may even find in some cases that Screen Updating is set back to true before your recorded macro completes.

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.