Consulting

Results 1 to 3 of 3

Thread: Solved: VBE and continue

  1. #1

    Solved: VBE and continue

    I seem to attract weird problems...

    When a line of code is continued, the line is ended with an underscore. For some strange reason when I attempt to continue a line, I get a "beep" and a message from VBE "This action will reset your project. Proceed anyway?"

    Since I have code in other macros that is continued with the underscore, I have no clue what I could be doing wrong. I did check the "num lock", "caps lock" and "scroll lock" which do not seem to be involved.

    Is this just my machine or do others have this problem?

  2. #2
    Knowledge Base Approver VBAX Master Oorang's Avatar
    Joined
    Jan 2007
    Posts
    1,135
    Location
    You aren't doing anything wrong. It's just a limitation of the "compiler". Most compilers will not even allow you to edit the code of a file while that file is running. However the VBE will "recompile" the code on the fly for you in most cases. This allows you to make an edit on a project while the project is executing. However the compiler can't recompile line continuations on the fly. So it's telling you if you make that particular edit, it's has to stop the execution to make the change.

    Broken as designed
    Cordially,
    Aaron



    Keep Our Board Clean!
    • Please Mark your thread "Solved" if you get an acceptable response (under thread tools).
    • Enclose your code in VBA tags then it will be formatted as per the VBIDE to improve readability.

  3. #3

    Thanks

    Another dumb mistake on my part! I don't have to watch TV for a laugh. All I have to do is think of all the mistakes I made during the day.

    Seriously, I appreciate your reply and explanation.

    Tracking back, I was using the debugger and it spotted a logic error for me. In this case, it was related to data being out of range, i.e. a design problem, not a coding error. I began fixing this on the fly, and the additional logic was several statements. I just forgot that I had been in the debugger...

    Thanks again.

Posting Permissions

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