Code Execution Has Been Interrupted

L

LCK

Hi,

A dialog box saying "Code Execution Has been interrupted" began to
appear when running Excel macros. I have already checked the code for
bugs and macros are OK -Besides, I' ve been using them for a while-

Anyone knows how to solve this issue?

Thanks
LCK
 
G

Guest

Under what conditions does this happen? All the time, or randomly? Does it
happen when the user takes some action or does it happen even if you have
your hands off the keyboard and mouse?

One possibility (similar things have happened to me): Check for a stuck
"Pause/Break" key. If you hit Ctrl-Break, of course, code would stop and you
would get that message. If the Break key happens to get stuck, any time you
press Ctrl - even inadvertentely - it would generate a Ctrl-Break. Have had
similar things happen often with sticky Alt keys; users want to know why
another app pops up when they try to Tab to a new field!
 
B

belgeler

Same thing happens on two of my PCs. This started to happen after one
of my VBA macros was interrupted, either by myself (ctrl+break) or an
error in the macro. I think, this triggers a bug in the system and
after that, whenever I try to run a macro, it gives the same message
over and over. My second PC was OK for several weeks and then one day,
after I stopped the macro to fix something, it started to do the same
thing. The only way to fix this is to reboot the machine. I have 2
other PCs and never had this problem with them. Once you have this
happened on your PC, it never goes away. Even when you restart, it's ok
only until you break a macro.

I'm sure this is not related to the way vba macros were written. It
stops at irrelevant lines and once it starts doing it, it does it for
all macros. Closing Excel doesn't help. It's not a stuck key issue. I'm
almost sure that manually breaking the macro triggers this. Once you
get this message, everytime you click on 'Continue' or press F5 in the
debug screen, it pops up again after couple seconds. However, you can
pass the line where it stopped by pressing F8 key. Thus, it cannot be
the macro.

Those 2 PCs I have are both brand new Dell machines whereas the other 2
problem free ones (a dell and an hp) are more than a year old. I have
Excel 2000, Office SP3 on all my machines. All four of them have XP
Professional version 5.1.2600. However, the old ones have SP1, the ones
I'm experiencing the problems have SP2. I'm thinking, maybe there's a
bug in XP SP2.

Tugsan Topcuoglu.
 

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