VBE code execution has been interrupted

User avatar
stuck
Panoramic Lounger
Posts: 8263
Joined: 25 Jan 2010, 09:09
Location: retirement

VBE code execution has been interrupted

Post by stuck »

My code was bad and it got stuck and in an attempt to interrupt it I used Ctrl+Break, repeatedly, as in held the keys down for a long time. That didn't seem to help but I eventually close Word.

Now though when I go back to the VBE and run my code (which I've corrected) it runs for a few lines and then stops with "code execution has been interrupted", as if I've clicked Ctrl+Break. Clicking continue will take it a few more lines and it will pause again.

Restarting Word does not help. Don't know if a complete reboot of the PC will help as I've not tried that yet but before I do that I wondered if my thrashing around trying to get out of bad code has turned on some sort of debugging feature In the VBE that I didn't know existed?

:scratch: any ideas?

Ken

User avatar
HansV
Administrator
Posts: 78894
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: VBE code execution has been interrupted

Post by HansV »

I would restart Windows. This should remove corrupt code from memory.
Best wishes,
Hans

User avatar
stuck
Panoramic Lounger
Posts: 8263
Joined: 25 Jan 2010, 09:09
Location: retirement

Re: VBE code execution has been interrupted

Post by stuck »

Power of Posting to the rescue again! A fresh Google search turned up this page:
https://social.msdn.microsoft.com/Forum ... rum=isvvba

The suggestion there worked, i.e. I ran the code and clicked 'Continue' until the code completed. I then switched to the VBE and did a Ctrl+Break. Now the code runs without interruption.

Ken

User avatar
HansV
Administrator
Posts: 78894
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: VBE code execution has been interrupted

Post by HansV »

Good to hear that the problem has been solved!
Best wishes,
Hans