Loading
Ozgrid Excel Help & Best Practices Forums

Excel Video Tutorials / Excel Dashboards Reports



Results 1 to 3 of 3

Thread: Can't Execute Code in Break Mode

  1. #1
    Join Date
    18th November 2006
    Posts
    12

    Can't Execute Code in Break Mode

    I have been typing in code in the VBA editor, then flipping back to excel and running the code as a sub. About every third or fourth line I add to the code, when I try to execute it in excel, i get a "can't execute code in break mode" error message. Usually I have to fiddle with the highlighted line in the VBA editor to get the code to work. Most often I just add the "continue line" charecter somewhere in the middle of the line, e.g.:

    Range("a1") = _
    2 + 2

    Though this works it results in ugly code. I know my identation and the amount of blank lines I use to sepearte code blocks are far from the norm. Could that be the cause?

    I seem to get these errors quite a lot and they are very annoying.

    Thanks for all help.

    Excel Video Tutorials / Excel Dashboards Reports


  2. #2
    Join Date
    18th November 2006
    Posts
    12

    Re: Frequent Break Mode Errors

    Oh, I forgot. I save and save often. Usually when I make a change to the code, no matter how small I save in the VBA editor. I can't imagine why this would cause the errors, but I've seen stranger things happen.

    Excel Video Tutorials / Excel Dashboards Reports


  3. #3
    Join Date
    24th January 2003
    Location
    Australia
    Posts
    31,713

    Re: Frequent Break Mode Errors

    can't execute code in break mode
    Simply means you are in Break Mode and code cannot be run while you are in Break Mode. See Restart Execution in the VBA help.


    Break Mode

    Temporary suspension of program execution in the development environment. In break mode, you can examine, debug, reset, step through, or continue program execution. You enter break mode when you:

    Encounter a breakpoint during program execution.


    Press CTRL+BREAK during program execution.


    Encounter a Stop statement or untrapped run-time error during program execution.


    Add a Break When True watch expression. Execution stops when the value of the watch changes and evaluates to True.


    Add a Break When Changed watch expression. Execution stops when the value of the watch changes.
    Last edited by Dave Hawley; November 18th, 2006 at 11:04.

Thread Information

Users Browsing this Thread

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

Possible Answers

  1. Allow User To Enter Break Mode (Debug)
    By khenzel in forum EXCEL HELP
    Replies: 6
    Last Post: January 4th, 2008, 09:01
  2. Replies: 0
    Last Post: December 14th, 2007, 13:22
  3. Error Message: this action will reset the current code in break mode.
    By sunnystone2001 in forum Excel and/or Access Help
    Replies: 1
    Last Post: December 20th, 2004, 22:15

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
  •  
porno