Problem with break point

N

Nancy T.

I have a form that I have some code under the Form Load procedure. When I was
testing it, I put a break point there so I could step through the code. Once
it was working as I wanted I removed the break point. However, now whenever I
open the form, the VB window pops up like the break point is still there. It
is really annoying and I don't know how to fix this. When I click on the X in
the upper right corner to close the VB window, I get a message box stating
"This command will stop the debugger." Any suggestions for me before I go
insane?
 
H

Howard Brody

I've had the same problem a couple of times and I think I've figured out why.

If you compile your code with the breakpoint and then remove the breakpoint,
it's still compiled into the code. Try recompiling your code without a
breakpoint in it. That works for me.

Hope this helps!

Howard
 
D

Dirk Goldgar

Nancy T. said:
I have a form that I have some code under the Form Load procedure.
When I was testing it, I put a break point there so I could step
through the code. Once it was working as I wanted I removed the break
point. However, now whenever I open the form, the VB window pops up
like the break point is still there. It is really annoying and I
don't know how to fix this. When I click on the X in the upper right
corner to close the VB window, I get a message box stating "This
command will stop the debugger." Any suggestions for me before I go
insane?

That happens sometimes, especially if you modify code while the code is
running. Simplest, quick fix: open form in design view and open its
module in the VB Editor, modify some line in a trivial manner and then
change it back. Click Debug -> Clear All Breakpoints, then click
Debug -> Compile, then click the Save button, and close the form.

Usually that fixes it.
 
N

Nancy T.

Howard & Dirk,

Thank you! Thank you! Thank you! Thank you! Thank you!

I did as you suggested and recompiled and it is fixed! I am a very happy
camper now.

Nancy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top