Results 1 to 4 of 4
  1. #1
    2 Star Lounger
    Join Date
    Jun 2001
    Location
    Virginia, USA
    Posts
    127
    Thanks
    0
    Thanked 0 Times in 0 Posts

    VBA code window (Excel 2003 SP3)

    PROBLEM: A very strange thing happens when I run my Excel application. It jumps into the VBA code window in break mode for no apparent reason. Sometimes, it tries to go into break mode but I get a message box that says something like "Code execution has been interrupted." with options to Continue, End, Debug (DISABLED), or End.

    BACKGROUND: Some info about the application: Sheet2 has a button that opens a form. The form allows users to filter their data retrieval by selected clients. The "GO" button on the form runs a SQL query via an ODBC connection returns data.

    MY ATTEMPTED SOLUTIONS: I verified that the db query is working. I have removed all the stops and cleared all breakpoints in the code. I have Compiled. Saved, Closed and reopened (usual MS solution to a whole host of issues.)

    Does anyone have any idea why this strange behavior is happing and more importantly, a possible solution? Any suggestions are greatly appreciated.

    Many thanks

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: VBA code window (Excel 2003 SP3)

    Try Jan Karel Pieterse's <!post=Systematic Approach to Behavioral Problems in XL,290455>Systematic Approach to Behavioral Problems in XL<!/post>.

  3. #3
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: VBA code window (Excel 2003 SP3)

    You might also try exporting, removing and then reimporting all code modules and userforms (or run Rob Bovey's Code Cleaner) to see if that helps.
    Regards,
    Rory

    Microsoft MVP - Excel

  4. #4
    2 Star Lounger
    Join Date
    Jun 2001
    Location
    Virginia, USA
    Posts
    127
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: VBA code window (Excel 2003 SP3)

    I did what you suggested (Exported, removed, imported) and still had the same issue. I even started with a new workbook and imported all the modules and form. However, because I had to shutdown overnight, when I re-opened the application, the strange behavior was gone. I don't know why it happened but I am investigating Hans V's link as well as looking into the code cleaner you mentioned.
    Thanks,

Posting Permissions

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