Solved

Setting a breakpoint in VBA using Excel 2007

Posted on 2011-09-07
4
373 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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
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…
Learn how to create and modify your own paragraph styles in Microsoft Word. This can be helpful when wanting to make consistently referenced styles throughout a document or template.
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.

751 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