debug not working

J

JimRich

I have some code that I am trying to fix and wanted to step through the code.
When i clicked on "Step Into" nothing happend. No other code is running.
The cursur is inside the sub routine. I have other code that is being
exicuted when i just run it but even with a breakpoint set it does not stop.
Is there a way to turn "Debug" back on?
 
J

Joel

Your top level subroutine or function probably has parameters or the
parameter list has an error. first try setting the Brek option in VBA as
follows from VBA menu

tools - Options - general - Break On Error

If you have a parameter list at your top level you can write a subrouting to
call your code. Define the parameter list to match you module.


Sub Test

Dim Param1 as Variant
Dim Param2 as Variant
Dim Param3 as Variant
Call Yourcode(param1, param2, param3)

end Sub
 
J

Jacob Skaria

--Do you have any arguments to be passed for this sub routine?
--Make sure you are within a module..
--When you say you have other code executed..do you mean at the same time?
is that in the same module or else where?

If this post helps click Yes
 
J

JimRich

No arguments.
I am within the module that I want to test.
No, not at the same time, just mean that I have modules that work like they
are supposed to. Event code, Module code. Can't use debug in any of it.
Breakpoints do not stop execution.
Some in the same module.
 
J

JimRich

The code I am trying to run is a deactivate event that closes a userform when
the active sheet is changed. Simple code, one line. Deactivate event does
not run. The form is not closed. Debug.print does not display in the
immediate window. Nothing happens when the sheet is changed. Everything is
spelled correctly. Even if it wasn't I would get an error message and a
highlight on the line that was wrong.
I tried rebooting the computer.
 

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