Solved

Setting a breakpoint in VBA using Excel 2007

Posted on 2011-09-07
4
372 Views
Last Modified: 2012-06-27
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
Comment
Question by:newbieweb
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 81

Accepted Solution

by:
zorvek (Kevin Jones) earned 250 total points
ID: 36498665
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
 
LVL 47

Assisted Solution

by:Martin Liss
Martin Liss earned 150 total points
ID: 36498667
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
 
LVL 59

Assisted Solution

by:Chris Bottomley
Chris Bottomley earned 100 total points
ID: 36498670
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
 

Author Closing Comment

by:newbieweb
ID: 36498721
Thanks!  There was code on Open that was creating the problem.
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question