Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2003

    Unanswered: Code Execution has been interupted

    I am getting this message from the code below on the Set OpenSourceFile = ActiveWorkbook line. I have stepped through this code over and over for days and this part i just let it run past. But now it stops and i get this message.

    I removed all break points compiled the project saved personal (file code is in). Closed and reopened excel. and still get it?

    Public Function OpenSourceFile(ByRef dir As String, fileName As String) As Workbook
    On Error GoTo hndl

    If Not m_Debugging Then Debug.Print dir & "\" & fileName

    Workbooks.Open fileName:=dir & "\" & fileName

    Set OpenSourceFile = ActiveWorkbook
    Exit Function
    MsgBox "todo: error hndl"
    m_CurrentErrorDesc = Error

    End Function

  2. #2
    Join Date
    Sep 2008
    London, UK
    This is what we call a "phantom breakpoint".

    With the project open in the VBA IDE try pressing CTRL+BREAK. Sometimes that sorts it out. If that doesn't work then try a reboot.

Posting Permissions

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