Debugging code in a form

M

MagicScreen

I am trying to debug logic in a form. I placed a breakpoint as well as the
Stop statement but neither one stopped the program from running at the point
I needed.

There is nothing in the Help to help me.

Please tell me how to debug VB code.

Thank you.
 
G

Graham Mandeno

Hi MagicScreen

Are you sure the code you are trying to debug is actually running? Try
putting a MsgBox or a Debug.Print in the code to verify this.

Sometimes in forms, a control can become disassociated from its event
procedure. Say you have a command button named CmdX and an event procedure
named CmdX_Click. You click the command button and nothing happens! The
first thing to check is the OnClick property of the command button, which
can sometimes, for no apparent reason, become blank instead of [Event
Procedure].

I have never seen a breakpoint or a Stop command fail to work.
 

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