What can you do to slow down a macro? I think my code is skipping some very crucial steps.
What can you do to slow down a macro? I think my code is skipping some very crucial steps.
1st: You can trace it by putting in a stop code (F9) on any line , then progress 1 step at a time(F8) to watch it.
2: you can put in loops to slow it down
for i = 1 to 5000
next
But I would trace it.
That probably isn't happening, though it might appear to be.
Try stepping through the code with F8 to see what's happening, take particular note if any areas are being skipped because of, say, an If statement.
Also, try putting some breakpoints on, or before, the steps that you think are being skipped, you can do that with F9.
When you next run the code execution will be interrupted wherever you've put a breakpoint, unless code is being skipped.
If posting code please use code tags, see here.
I've traced it many times with F8. Everything works fine when I step into, but when I try to run the whole code, it looks like it's skipping steps.
Did you try putting break points on the code you think is being skipped?
It cant do it different when you watch it vs when you dont.
Thank you! I will try again and see what happens.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks