Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Code execution has been interrupted ?? 1

Status
Not open for further replies.

jammastajc

Programmer
Aug 13, 2003
9
0
0
US
I am continually receiving the error "Code execution has been interrupted" when trying to execute a filter I wrote for Excel in VBA. Every time I debug, the code has stopped in a different location. VBA Help implies that this halt was caused by the developer manually entering into break mode, but I never hit ctrl+break! When the halt does come up, if I hit continue, it will continue filtering the information until the error happens again. Eventually, the code will complete and I will have the information I want. One Google search stated that this occurs because the code somehow got ahead of itself. Thanks for any help.
 
Anyone have any ideas on this yet? I can submit code fragments (however, due to the nature of the problem, I'm not sure what I would submit) or any other information that might help. Thanks.
 
Your question is in regards to VBA and Excel... you'd probably have better luck posting in the VBA Forum, Forum707.

VB != VBA


Close only counts in horseshoes and hand grenades.

--
Jonathan
 
Are you using a STOP command anywhere? Do a search.
 
I'm not using the a STOP command anywhere. I can post the code in an hour or two. Its not too extensive.
 
Jammastajc,
did you ever figure this out? i have a fairly complex excel macro - written from scratch in VBA - which has always run fine until today, when it started doing the same thing as you described. I continually get the "code execution has been interrupted" error, but I can hit continue-continue-continue and it will execute. Strange thing is, the macro continues to work on some computers and not others. Given the timing of your post (and my varying experience with multiple computers), I thought maybe this was somehow virus related (our company recently got hit by blaster and another virus). But, according to our tech guys, the computer(s) with the error checked out virus-free. Just wondering if you made any progress on this...
Thanks
 
pbbriggs,
I still have not found a solution to the problem. I saw that you posted on the thread I started in the VBA topic. I thought Dale's solution helped (it did increase the code speed immensely), but when I started working on the code some more, the same error came up again. It seems as though the break occurs after I debug the code for other reasons. If I restart the system, and run the code free of any errors, the problem goes away. Although when I begin debugging, the problem begins again. Our company was also hit by blaster, including my own workstation, but this problem began before the infection. My patience has grown to the point where I just click through the breaks until its done, restarting periodically to clear the problem.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top