[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 379
  • Last Modified:

Setting a breakpoint in VBA using Excel 2007

I am starting to code in VBA Excel 2007 but want to have the code to stop at a breakpoint. When I press F9 on the code, it displays the red dot, so I get the feeling it should stop there. But it does not.

What do I need to do?

Thanks,
newbieweb

0
newbieweb
Asked:
newbieweb
3 Solutions
 
zorvek (Kevin Jones)ConsultantCommented:
The code is probably not being executed. Is it inside a condition? Set the break point in another location that you are sure will be executed.

If you are sure the code is being executed, try using a Stop statement.

Kevin
0
 
Martin LissOlder than dirtCommented:
It means that the code doesn't get there. Put a breakpoint at the top of the procedure. Does it get there? And it would help to post your code and indicate where you have the breakpoint set.
0
 
Chris BottomleyCommented:
Are you sure the code line where you set the breakpoint is actually being executed and note if stepping through then there is no stop as such ... only if it runs normally.

Also you can add a command STOP ... this will stop the code if the instruction is encountered.

Chris
0
 
newbiewebSr. Software EngineerAuthor Commented:
Thanks!  There was code on Open that was creating the problem.
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now