Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Macro getting stuck in debug mode - How to stop this behavior 1

Status
Not open for further replies.

topoulos

Programmer
Aug 6, 2007
3
US
Hi!
I Have some excel macros that are getting stuck in debug mode (break mode). It's as if there were an invisible break statement. It tends to happen to different macros at different times. Has anyone had any problems or experiences with this behavior? I am using Excel 2003 VBA, and sometimes it happens with Reflections VBA as well.

thanks for your help!
Louis
 
Any error message? Is the vba code password-protected? What is the error trapping status (tools>options, 'general' tab)?

combo
 
Thank you for your assistance.

There is no error message.
The code is not password protected.
Error trapping is set to break on Unhandled.
It's as if the code is being "stepped" into. If you do an F5 to run, it goes for a while before breaking again. There are no breakpoints.

Thanks again in advance!
Louis
 
I've had issues where I used a breakpoint, closed the file without removing it and when I reopened the file it was still there but invisible. Try setting a breakpoint and removing it.
 
Holy cow, that fixed it. That is totally wierd. I wonder if Microsoft knows about this bug? Thanks for your help and assistance!
 
Do you have the yellow marker on the break line, or only VBE window is activated? I would try to set any local variable in the procedure (for instance add varTest=1) and, after break, see if it (and any other things) appear in the 'locals' window. You can check the stack too and see what is going on when executing the code line by line.

combo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top