Excel 2016 application screenupdating not working

When executing a macro, you can sit back and watch all the onscreen action that occurs in the macro.

Although doing this can be instructive, after you get the macro working properly, it’s often annoying and can slow the performance of your macro considerably.

excel 2016 application screenupdating not working-60

Your code runs faster if you use the With-End With structure.

An additional benefit is that your code may be easier to read.

When you’re debugging code, program execution sometimes ends somewhere in the middle without your having turned Screen updating back on.

This sometimes causes Excel’s application window to become totally unresponsive.

In the case of deleting a sheet, the default operation is Delete.

If you’re not sure what the default operation is, perform a test to see what happens.

Fortunately, you can disable the screen updating that normally occurs when you execute a macro.

To turn off screen updating, use the following statement: The range is filled much faster, and you don’t see the result until the macro is finished running and screen updating is (automatically) set to True.

When VBA works with data, execution speed depends on the number of bytes VBA has at its disposal.

In other words, the fewer bytes data uses, the faster VBA can access and manipulate the data. If speed is critical, use the Long data type instead.

In many cases, you can start a macro and then go hang out in the break room while Excel does its thing.

Tags: , ,