View Single Post
  #16   Report Post  
Posted to microsoft.public.excel.programming
DavidAtCaspian DavidAtCaspian is offline
external usenet poster
 
Posts: 10
Default Let's try again: VBA Code stops randomly

I have this same problem. It happened on one machine about two weeks ago and
has now spread to three.

The code is not complicated, and has run perectly fine for months
..
I've checked for viruses and spyware, run the code cleaner tool (which
worked last week, but doesn't today)

I haven't come across the application cancel key one befo Surely this is
effectively taking away the capability of breaking into the code with
CTRL-Break?
And if so, seems to indicate that 'something' on these PCs is simulating
this key combination spontaneously -- but only in Excel -- so far, none of my
Access code is suffering.




If I didn't know better I'd say that a recent automatic update might be the
culprit.





"Grant Briggs" wrote:


I've encountered the same problem with the "Code Execution Interrupted"
error. Setting the EnableCancelKey property on the Application object
to xlDisabled in the first line of code (ie."Application.EnableCancelKey
= xlDisabled") seems to have fixed the issue. I don't if this will work
in all cases, but it worked for me. Hope this helps.



*** Sent via Developersdex http://www.developersdex.com ***