PC Review


Reply
Thread Tools Rate Thread

Alien abduction of VB: "Code execution has been interrupted..."

 
 
Paul B.
Guest
Posts: n/a
 
      17th Jul 2008
I have literally hundreds of VB macros that have run flawlessly for years.
Suddenly this message started to appear everywhere. I found discussions of
the problem in various on-line forums, which report that the problem is not
just in Excel, but in Word and Access macros as well. So clearly this
phenomenon is a widespread malady. Something is going terribly wrong with VB.

My company's IT support staff gave me a brand new PC because of this
problem. Within an hour the problem appeared on the new PC, so clearly it was
ported over with my Excel workbooks.

I've read of workarounds like Application.EnableCancelKey=xlDisabled and
code cleaners (which don't much help in my case). I've also read various
theories regarding the cause. None of them sound credible up to now because
they imply that this is an isolated, local issue and I know that it's all
over the VB community.

On top of the code execution message, I'm finding that heretofore reliable,
bulletproof macros are occasionally generating spurious results.

Clearly something happend recently to a large number of VB users that make
their program execution environment unhstable. Is it a virus? Is it a
Microsoft patch to XP?

Something is not right. Please help.

Paul B.


 
Reply With Quote
 
 
 
 
Mike H
Guest
Posts: n/a
 
      17th Jul 2008
Hi,

One suggestion that has been known to work for this is to put this line at
the start of your code

Application.EnableCancelKey = xlDisabled


Mike

"Paul B." wrote:

> I have literally hundreds of VB macros that have run flawlessly for years.
> Suddenly this message started to appear everywhere. I found discussions of
> the problem in various on-line forums, which report that the problem is not
> just in Excel, but in Word and Access macros as well. So clearly this
> phenomenon is a widespread malady. Something is going terribly wrong with VB.
>
> My company's IT support staff gave me a brand new PC because of this
> problem. Within an hour the problem appeared on the new PC, so clearly it was
> ported over with my Excel workbooks.
>
> I've read of workarounds like Application.EnableCancelKey=xlDisabled and
> code cleaners (which don't much help in my case). I've also read various
> theories regarding the cause. None of them sound credible up to now because
> they imply that this is an isolated, local issue and I know that it's all
> over the VB community.
>
> On top of the code execution message, I'm finding that heretofore reliable,
> bulletproof macros are occasionally generating spurious results.
>
> Clearly something happend recently to a large number of VB users that make
> their program execution environment unhstable. Is it a virus? Is it a
> Microsoft patch to XP?
>
> Something is not right. Please help.
>
> Paul B.
>
>

 
Reply With Quote
 
Keithlo
Guest
Posts: n/a
 
      17th Jul 2008
I would however take note of this snippet from VBA Help on topic
EnableCancelKey Property:
"Remarks
Use this property very carefully. If you use xlDisabled, there's no way to
interrupt a runaway loop or other non – self-terminating code. Likewise, if
you use xlErrorHandler but your error handler always returns using the Resume
statement, there's no way to stop runaway code."

I'm thinking you'd have to kill Excel via Task Manager in the cases described.

Keith


"Mike H" wrote:

> Hi,
>
> One suggestion that has been known to work for this is to put this line at
> the start of your code
>
> Application.EnableCancelKey = xlDisabled
>
>
> Mike
>
> "Paul B." wrote:
>
> > I have literally hundreds of VB macros that have run flawlessly for years.
> > Suddenly this message started to appear everywhere. I found discussions of
> > the problem in various on-line forums, which report that the problem is not
> > just in Excel, but in Word and Access macros as well. So clearly this
> > phenomenon is a widespread malady. Something is going terribly wrong with VB.
> >
> > My company's IT support staff gave me a brand new PC because of this
> > problem. Within an hour the problem appeared on the new PC, so clearly it was
> > ported over with my Excel workbooks.
> >
> > I've read of workarounds like Application.EnableCancelKey=xlDisabled and
> > code cleaners (which don't much help in my case). I've also read various
> > theories regarding the cause. None of them sound credible up to now because
> > they imply that this is an isolated, local issue and I know that it's all
> > over the VB community.
> >
> > On top of the code execution message, I'm finding that heretofore reliable,
> > bulletproof macros are occasionally generating spurious results.
> >
> > Clearly something happend recently to a large number of VB users that make
> > their program execution environment unhstable. Is it a virus? Is it a
> > Microsoft patch to XP?
> >
> > Something is not right. Please help.
> >
> > Paul B.
> >
> >

 
Reply With Quote
 
gregr96
Guest
Posts: n/a
 
      31st Jul 2008
Hi Paul

Had the same issue with some code I'd written. Turned out that they had
installed a web component for office 2003
(http://www.microsoft.com/downloads/d...displaylang=en).
Had a look at the activex component on the net and found there was a SP1 for
it
(http://www.microsoft.com/downloads/d...displaylang=en). Installed that and all was good.

Greg

"Keithlo" wrote:

> I would however take note of this snippet from VBA Help on topic
> EnableCancelKey Property:
> "Remarks
> Use this property very carefully. If you use xlDisabled, there's no way to
> interrupt a runaway loop or other non – self-terminating code. Likewise, if
> you use xlErrorHandler but your error handler always returns using the Resume
> statement, there's no way to stop runaway code."
>
> I'm thinking you'd have to kill Excel via Task Manager in the cases described.
>
> Keith
>
>
> "Mike H" wrote:
>
> > Hi,
> >
> > One suggestion that has been known to work for this is to put this line at
> > the start of your code
> >
> > Application.EnableCancelKey = xlDisabled
> >
> >
> > Mike
> >
> > "Paul B." wrote:
> >
> > > I have literally hundreds of VB macros that have run flawlessly for years.
> > > Suddenly this message started to appear everywhere. I found discussions of
> > > the problem in various on-line forums, which report that the problem is not
> > > just in Excel, but in Word and Access macros as well. So clearly this
> > > phenomenon is a widespread malady. Something is going terribly wrong with VB.
> > >
> > > My company's IT support staff gave me a brand new PC because of this
> > > problem. Within an hour the problem appeared on the new PC, so clearly it was
> > > ported over with my Excel workbooks.
> > >
> > > I've read of workarounds like Application.EnableCancelKey=xlDisabled and
> > > code cleaners (which don't much help in my case). I've also read various
> > > theories regarding the cause. None of them sound credible up to now because
> > > they imply that this is an isolated, local issue and I know that it's all
> > > over the VB community.
> > >
> > > On top of the code execution message, I'm finding that heretofore reliable,
> > > bulletproof macros are occasionally generating spurious results.
> > >
> > > Clearly something happend recently to a large number of VB users that make
> > > their program execution environment unhstable. Is it a virus? Is it a
> > > Microsoft patch to XP?
> > >
> > > Something is not right. Please help.
> > >
> > > Paul B.
> > >
> > >

 
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 am I getting "Code execution has been interrupted" message Chris Freeman Microsoft Excel Programming 3 23rd Jun 2009 11:11 PM
"Code execution has been interrupted" message Dave O Microsoft Excel Misc 5 12th Jun 2008 11:35 PM
VBA "Code execution interrupted" error on End Sub and End IF c0mmands?? Allan P. London, CPA Microsoft Excel Programming 0 13th May 2008 09:01 PM
How to Diagnose Why "Code Execution has been interrupted" Neal Zimm Microsoft Excel Programming 1 23rd Jan 2008 04:20 AM
"code execution has been interrupted" message on startup of Word =?Utf-8?B?Z2FicmlvbGFpc2xhbmRlcg==?= Microsoft Word Document Management 2 16th Nov 2004 07:58 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:41 AM.