PC Review


Reply
Thread Tools Rate Thread

Code Execution Has Been Interupted

 
 
=?Utf-8?B?THVrZSBCYWlsZXk=?=
Guest
Posts: n/a
 
      9th Nov 2007
Hello,

I have several Excel Templates that open on automated PC using scheduled
tasks. The templates run through a series of code. The templates all work
fine on my laptop. However, they are often times running into a "Code
Execution Has Been Interrupted" error on my desktop PC running the scheduled
tasks. There is nothing wrong in the code (runs fine from other PC's).
Keystrokes are not entered on the desktop that would stop execution of the
code, I have checked References.... Can't find anything wrong. Furthermore,
the code execution stops at different places in the same workbook. It's
being interupted at places like a "DOEVENTS" statement or an ".end with"
where you don't normally expect any problem. I have found a fix to be
(sometimes) to copy all code out to Word. Remove code from original temlate,
then insert new modules and paste the code. This solves the problem
sometime. Sometimes not. I've also found Dave Bovey's Code Cleaner to do a
great job. My question is, can anyone tell me why this occurs? And are
there any other recommended solutions?
 
Reply With Quote
 
 
 
 
=?Utf-8?B?SkxHV2hpeg==?=
Guest
Posts: n/a
 
      10th Nov 2007
If you have run a disc clean up and defrag recently, I would not know what
else to do. It is usually either a memory problem or a disc space problem or
a combination thereof. The compiler can't find enough room to manipulate.

"Luke Bailey" wrote:

> Hello,
>
> I have several Excel Templates that open on automated PC using scheduled
> tasks. The templates run through a series of code. The templates all work
> fine on my laptop. However, they are often times running into a "Code
> Execution Has Been Interrupted" error on my desktop PC running the scheduled
> tasks. There is nothing wrong in the code (runs fine from other PC's).
> Keystrokes are not entered on the desktop that would stop execution of the
> code, I have checked References.... Can't find anything wrong. Furthermore,
> the code execution stops at different places in the same workbook. It's
> being interupted at places like a "DOEVENTS" statement or an ".end with"
> where you don't normally expect any problem. I have found a fix to be
> (sometimes) to copy all code out to Word. Remove code from original temlate,
> then insert new modules and paste the code. This solves the problem
> sometime. Sometimes not. I've also found Dave Bovey's Code Cleaner to do a
> great job. My question is, can anyone tell me why this occurs? And are
> there any other recommended solutions?

 
Reply With Quote
 
michael.beckinsale
Guest
Posts: n/a
 
      10th Nov 2007
Hi Luke,

I know that this might sound like an over simplification but l have
had similiar problems in the past which l have found to be the result
of over zealous use of the 'esc' key to interupt your VBA code.

The keystrokes are retained in memory so when you reset your project
it will fail again & again until all the 'esc' are used. This can
usually be overcome by rebooting your PC. Closing Excel does not do
it.

I have also occasionally found that my desktop PC keyboard ends up
with sticky keys (odd bit of food in it etc) and if this is the 'esc'
key the problem you describe manifests itself.

Hope this is of use to you. As l say l have had this problem exactly
as described and it took me ages to detect.

Regards

Michael Beckinsale

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why do I get Code Excution has been interupted Chris Freeman Microsoft Excel Programming 5 27th Jun 2009 08:24 AM
code execution has been interupted - Excel 2003 David_W Microsoft Excel Programming 2 19th Jan 2009 02:17 PM
Macro 'Code execution has been interupted' error after print? =?Utf-8?B?Qmx1ZWhhaXIgdGhlIFBpcmF0ZQ==?= Microsoft Excel Programming 1 9th Feb 2006 06:19 PM
Code Execution has been interupted =?Utf-8?B?UmljaA==?= Microsoft Excel Misc 2 10th May 2005 12:52 PM
"Code execution has been interupted" Dennis Fry Microsoft Excel Programming 2 17th Sep 2003 08:29 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:00 PM.