Screenupdating vba msdn
Without a good logic, a good written VBA macro program has no value. Analyze the logic: Before optimizing the syntax, pay more attention in optimizing the logic.It is annoying for VBA processor as it needs to fully qualify the object each time. This concept tells us to use [A1] rather than Range("A1") and Range("Stock Range")(3,4) rather than Range("Stock Range").(Isn't it annoying for us too when some work or something is told us again and again? The point here to understand is minimum qualifying of an object by VBA processor. Cells(3,4) Use vb Null String instead of ""(2 double quotes) : vb Null String is slightly faster than "", since vb Null String is not actually a string, but a constant set to 0 bytes, whereas "" is a string consuming at least 4-6 bytes for just existence.
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'.If any other references point to the same object, the object will not be destroyed.Reduce the number of Lines: Avoid multiple statements especially when they can be clubbed into one line.On the eve before Christmas, I'm writing this article on VBA code optimization for my blog readers as a gift. For example, a macro that required several seconds to complete in an earlier version of Excel may require several minutes to complete in a later version of Excel.It contains both the knowledge and good practices which if followed and used effectively then it might put you in elite category of excellent VBA programmers. This problem may occur if the following conditions are true: * The VBA macro modifies the properties of many rows or columns.