Can't break out of code help!

M

msnyc07

Somehow one of my VBAs got called and I can't get out if it. Esc only calls
up the Dialog box that allows me to End/Continue/Debug, End does nothing,
Debug stops but I still can't CANCEL it. Any suggestions? I am stuck
otherwise and will lose a lot of work...
 
J

JLGWhiz

If you are in debug with the highlight showing, click the Design Mode icon,
if the debug highlight goes out, you are out of the macro. I am betting
that you are using an event code for a sheet_change. If so, before clicking
the icon, put a comment (apostorphe) in front of your macro title. That
will prevent it from running until you can straighten out the code.
 
J

JLatham

Some things to try:
Go ahead and get into it with [Debug] and then go back to the main window
and click the disk icon to save the file, or attempt plain old File --> Save.

Or maybe once you get into the debug mode, you can add an Exit Sub line of
code just below the line you interrupted it in?
 
J

JLGWhiz

Maybe you could share with us the type of macro you are running. i.e. Sheet
event, control event, etc. Whatever event, if you can get it to debug, you
can stop it without losing anything by commenting it out. If all else fails
Ctrl + Alt +Del will definitely stop it, but you will lose data.
 
M

msnyc07

Thanks all. Excel finally crashed, which it seems to like to do several
times a week, functions or not. Pretty much tired of it as it is next to
impossible to recreate my work.

JLatham said:
Some things to try:
Go ahead and get into it with [Debug] and then go back to the main window
and click the disk icon to save the file, or attempt plain old File --> Save.

Or maybe once you get into the debug mode, you can add an Exit Sub line of
code just below the line you interrupted it in?


msnyc07 said:
Somehow one of my VBAs got called and I can't get out if it. Esc only calls
up the Dialog box that allows me to End/Continue/Debug, End does nothing,
Debug stops but I still can't CANCEL it. Any suggestions? I am stuck
otherwise and will lose a lot of work...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top