vba - Macros takes significantly more time to execute when launched with a button or hot keys than directly -


faced problem execution time of macros, placed timer code estimating it. found when launch macros button takes macros 7 minutes finish (the same active x , non-active x button , hot keys launch), code console (f5) it's minute, no errors , same result. goes this:

sub mit() application.screenupdating = false itimer! = timer call mit1 call mit2 msgbox "execution time" & _ format((timer - itimer!) / 86400, "long time"), vbexclamation, "" application.screenupdating = true end sub 

the called subs quite extensive , there more of them, might important start

application.screenupdating = false 

i need make execute within same time buttons code console, have no idea why different.

tested on several data sets , couple of computers.


Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -