Closed Thread
Results 1 to 7 of 7

Code execution has been interrupted error on my macro file

  1. #1
    Forum Contributor
    Join Date
    12-01-2007
    Location
    USA-North Carolina
    MS-Off Ver
    MS Office 2016
    Posts
    2,662

    Code execution has been interrupted error on my macro file

    I have gotten this "Code execution has been interrupted error" from time to time. I usually spend about 2hrs trying to figure it out looking at my code. Once i realize i have no idea i shut down excel, if error still occurs then i reboot system and after reboot


    the error is gone.

    i have NO idea what causes this error or how to identify that the error requires a reboot or why?

    Does anyone have any ideas on this........i spend way to much time on this kind of thing.......any suggestions would be appreciated.

    enclosed is a pic of the error and what the help dialog says
    Attached Images Attached Images
    Last edited by welchs101; 07-21-2011 at 07:42 AM.

  2. #2
    Forum Expert Colin Legg's Avatar
    Join Date
    03-30-2008
    Location
    UK
    MS-Off Ver
    2003, 2007, 2010, 2013
    Posts
    1,252

    Re: Code execution has been interrupted error on my macro file

    One fix is to add this line of code at the start of the procedure:
    Please Login or Register  to view this content.
    Hope that helps,

    Colin

    RAD Excel Blog

  3. #3
    Forum Contributor
    Join Date
    12-01-2007
    Location
    USA-North Carolina
    MS-Off Ver
    MS Office 2016
    Posts
    2,662

    Re: Code execution has been interrupted error on my macro file

    yes, that might work but i do not want to lose the flexibility of stoping the macro by pressing Cntr+break if ever i need to. But thanks anyway.

    I did find something on the web

    ******************
    The simple thing that seemed to fix the issue for me... When the code is interrupted... Click to debug the code and then hit ctrl + break.

    When you run the code again, it will work fine. Hopefully this will work for others as well.
    ******************

    I dont know if this will work or not as i rebooted my machine and its working again.

  4. #4
    Forum Expert Colin Legg's Avatar
    Join Date
    03-30-2008
    Location
    UK
    MS-Off Ver
    2003, 2007, 2010, 2013
    Posts
    1,252

    Re: Code execution has been interrupted error on my macro file

    Totally understandable. I listed some other ideas here:
    http://www.mrexcel.com/forum/showpos...20&postcount=6

    But none of them are permanent guarantees.

  5. #5
    Forum Contributor
    Join Date
    12-01-2007
    Location
    USA-North Carolina
    MS-Off Ver
    MS Office 2016
    Posts
    2,662

    Re: Code execution has been interrupted error on my macro file

    i just had the problem again................i tried what i posted in a previous post (7/15/11 9:51am) ...........IT WORKED!!!!!!!!!!!!!!!!!!!!!!

    Hit debug , then pressed cntrl+break..........

    when i went to run code again it worked!!!!!!!!!!!!!!!!!!!!!!!!!!!

  6. #6
    Registered User
    Join Date
    03-26-2012
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    1

    Unhappy Re: Code execution has been interrupted error on my macro file

    How about if debug button is diasabled ?

    i only get option End and help as active buttons ?

    can anyone suggest what is the main cause of this error , why does this come ?

  7. #7
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Code execution has been interrupted error on my macro file

    Sachin,

    Welcome to the Forum, unfortunately:

    Your post does not comply with Rule 2 of our Forum RULES. Don't post a question in the thread of another member -- start your own thread. If you feel it's particularly relevant, provide a link to the other thread. It makes sense to have a new thread for your question because a thread with numerous replies can be off putting & difficult to pick out relevant replies.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1