Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
breakpoint affecting the run speed of a macro
Hi,
I have a macro that seems to be running slowly when left to its own devices. I did some testing to figure out which particular part of the macro was being slow (a part that loops through an array and writes data to a worksheet). If I put a breakpoint immediately before the slow part then hit F5 to continue execution, it runs much faster (2 secs versus 30 secs without the breakpoint). This makes no sense to me. Can someone please explain what precisely is happening here? Thanks! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
breakpoint affecting the run speed of a macro
Probably got its second wind.
"kebabb" wrote: Hi, I have a macro that seems to be running slowly when left to its own devices. I did some testing to figure out which particular part of the macro was being slow (a part that loops through an array and writes data to a worksheet). If I put a breakpoint immediately before the slow part then hit F5 to continue execution, it runs much faster (2 secs versus 30 secs without the breakpoint). This makes no sense to me. Can someone please explain what precisely is happening here? Thanks! |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
breakpoint affecting the run speed of a macro
Just a guess... try adding "DoEvents" (no quote marks) on its own
line at the place where you had entered the break point. -- Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware "kebabb" wrote in message Hi, I have a macro that seems to be running slowly when left to its own devices. I did some testing to figure out which particular part of the macro was being slow (a part that loops through an array and writes data to a worksheet). If I put a breakpoint immediately before the slow part then hit F5 to continue execution, it runs much faster (2 secs versus 30 secs without the breakpoint). This makes no sense to me. Can someone please explain what precisely is happening here? Thanks! |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
breakpoint affecting the run speed of a macro
i seen significant speed differences when running code after opening the vbe.
even if i close it, code runs slower. but if i quit , restart excel and then run the code, it is fast again. open and close the code editor, it slows down. -- Gary "kebabb" wrote in message ps.com... Hi, I have a macro that seems to be running slowly when left to its own devices. I did some testing to figure out which particular part of the macro was being slow (a part that loops through an array and writes data to a worksheet). If I put a breakpoint immediately before the slow part then hit F5 to continue execution, it runs much faster (2 secs versus 30 secs without the breakpoint). This makes no sense to me. Can someone please explain what precisely is happening here? Thanks! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Range Name affecting speed of macro | Excel Worksheet Functions | |||
Range Name affecting speed of macro | Excel Programming | |||
Macro affecting hyperion retreive | Excel Programming | |||
Breakpoint ok, no breakpoint messes up... | Excel Programming | |||
sumproduct, arrays affecting speed | Excel Worksheet Functions |