Vba code screenupdating
Looking at his benchmark and its VBA code you can see that has Screen Updating ON and repeatedly calculates in Automatic mode.Each calculation triggers some RANDBETWEEN functions with a number of dependent cells.Since their values never change, they are evaluated only once when your code is compiled, rather than each time they are used at run time.
By doing so, a great deal of overhead is done at compile time ("Early Binding") rather than at run time ("Late Binding").
Gurs does not want to speed up his benchmark because that would destroy his historic speed comparisons.
But the problem is that a large portion of the time in his benchmark is taken by screen updating, and so his benchmark results vary significantly depending what part of the worksheet is actually visible on the screen, and hence how many visible cells get refreshed at each calculation.
This page lists some suggestions and strategies for optimizing your Visual Basic For Applications (VBA) code, so that it will run faster.
There are few absolute rules for optimizing VBA; you'll see the best increases in performance by streamlining the basic logic.
Screen Updating = False at the beginning of your code, then if any user runs the code, they will not know what is going on and think that the computer system is not responding.