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

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -