ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Code Execution has been interupted (https://www.excelbanter.com/excel-discussion-misc-queries/25443-code-execution-has-been-interupted.html)

Rich

Code Execution has been interupted
 
I have written a macro within excel. Works really well but can take up to an
hour to process. Problem is that every now and again, I get the message
"code execution has been interupted".

I read the help file and this does not help. I am not pressing "Ctrl-break"
or any other combination of keys. In fact I am not even touching the
keyboard at the time!

Anyone any clues as to why this might happen?
The macro does access some other spreadsheet, but these are no opened by
anyone else at the time (they are all on my C drive).

Help anyone?

Kassie

Without seeing the code, it would be nigh impossible to help!

"Rich" wrote:

I have written a macro within excel. Works really well but can take up to an
hour to process. Problem is that every now and again, I get the message
"code execution has been interupted".

I read the help file and this does not help. I am not pressing "Ctrl-break"
or any other combination of keys. In fact I am not even touching the
keyboard at the time!

Anyone any clues as to why this might happen?
The macro does access some other spreadsheet, but these are no opened by
anyone else at the time (they are all on my C drive).

Help anyone?


Jim Rech

In fact I am not even touching the | keyboard at the time!

Even so, the macro is stopping as if you hit Esc. I cannot imagine what is
causing this but you can try to deal with the symptoms with this:

Application.EnableCancelKey = xlDisabled

After this Esc will not stop the macro (which you may not like) and perhaps
this will stop the pseudo-Esc too.

--
Jim
"Rich" wrote in message
...
|I have written a macro within excel. Works really well but can take up to
an
| hour to process. Problem is that every now and again, I get the message
| "code execution has been interupted".
|
| I read the help file and this does not help. I am not pressing
"Ctrl-break"
| or any other combination of keys. In fact I am not even touching the
| keyboard at the time!
|
| Anyone any clues as to why this might happen?
| The macro does access some other spreadsheet, but these are no opened by
| anyone else at the time (they are all on my C drive).
|
| Help anyone?




All times are GMT +1. The time now is 05:22 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com