View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default Alien abduction of VB: "Code execution has been interrupted..."

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.