PDA

View Full Version : Solved: VBE and continue



jwise
09-04-2007, 02:14 PM
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?

Oorang
09-04-2007, 02:35 PM
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:)

jwise
09-04-2007, 03:33 PM
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.