+ Reply to Thread
Results 1 to 2 of 2

"Code Execution Has Been Interrupted" - Unknown reasons

  1. #1
    Registered User
    Join Date
    03-10-2015
    Location
    Oakland, CA
    MS-Off Ver
    2013
    Posts
    16

    "Code Execution Has Been Interrupted" - Unknown reasons

    I have a large workbook that I use regularly for project modeling. I am a novice VBA user, but there are a number of simple macros built in throughout. Many of these macros are used to show or hide certain data fields based on what has been selected in in other sections. This has been working fine until recently, when I started getting the "Code execution has been interrupted" pop-up. I have not added any breakpoints and I have additionally tried to clear all breakpoints so I am not sure what is causing this. When I use the debugger, it highlights the code from two of the worksheets, which is pasted below. The code in both is identical apart from differences in the specific range. This same code is used on other worksheets in the same workbook but does not trigger the interruption. Additionally, if I open older versions of the workbook, I do not get this interruption unless the newer version (which has started triggering the issue) is also open, in which case the same worksheets seem to be "afflicted." The newer version employs some similar additional code, but it references different parts of the workbook.

    Any help in diagnosing and solving this issue would be greatly appreciated.

    Private Sub Worksheet_Calculate()

    Application.ScreenUpdating = False
    Dim c As Range
    For Each c In Range("F5:V5")
    c.EntireColumn.Hidden = (c.Value = "")
    Next c
    Application.ScreenUpdating = True
    End Sub

  2. #2
    Forum Expert
    Join Date
    02-14-2009
    Location
    .
    MS-Off Ver
    ................
    Posts
    2,840

    Re: "Code Execution Has Been Interrupted" - Unknown reasons

    Here's the long shot. When the pop up appears, select 'Debug' then press Ctrl-Break twice. Press F5 to resume and save the file when the code finishes.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] "Code execution has been interrupted" Error
    By Speshul in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-25-2014, 12:33 PM
  2. [SOLVED] HELP: "Code execution has been interrupted" Error
    By knevil in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-25-2013, 04:23 PM
  3. " Code Executing has been interrupted" error.
    By milankc123 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-30-2013, 03:37 AM
  4. [SOLVED] Code execution jumps from "end function" to the code beginning
    By Alexander_Golinsky in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-29-2012, 04:40 AM
  5. WorkbookActivate Event stopping with "code interrupted" message after Alt-Tab
    By blackworx in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-02-2012, 06:35 AM
  6. "code execution has been interrupted" My error, or glitch?
    By DanBraden in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-08-2011, 12:35 PM
  7. "Code execution has been interrupted" - any ideas?
    By lottesfog in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-04-2008, 08:46 PM

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