Screenupdating vba msdn
Use Worksheet Functions wherever applicable Do read full article to understand the logic behind them.
o In Microsoft Office Excel 2003 and in earlier versions of Excel, we click Page Setup on the File menu.
o We modify any of the properties of the Page Setup object in a VBA macro.
Refer to this Microsoft article for more details - Use 'WITH' statement when working with objects: If we have to access an object's properties and methods in several lines, we must avoid using object's name or fully qualified object path again and again.
We rarely fire an event for each cell we're changing via code.
Enable Events to tell VBA processor whether to fire events or not.
Hide Page Breaks: When we run a Microsoft VBA macro in a later version of Microsoft Excel, the macro may take longer to complete than it does in earlier versions of Excel.
Hence, turning off events will speed up our VBA code performance.
However VBA compiler tokenizes the word but it does not compress the lines and each line is maintained as is ending with the 'Carriage Return'.
When the VBA macro is executed, VBA processor fetched single line at a time.
The tokens of the fetched line saved by virtual compiler are now interpreted and executed then next line is fetched and so on.
Behind the scenes, VB still makes extensive use of pointers. This little piece of software tries to determine whether or not an object should be destroyed.
There are many ways to implement a garbage collector, but Visual Basic uses what is called the reference count method.
Avoid 'Screen Flickering' or 'Screen Repainting': Use Application.