Phantom Breakpoints

The phantom breakpoint: what causes it and how to solve the problem.

Q:  Don R. writes:  When I click a command button to print a Word letter (this button runs VBA code to create the letter from a Word template), the code stops on a certain line, which is highlighted in yellow.  What is causing this, and how can I put a stop to it, so the letter will just print?

A:  This is the phantom breakpoint problem, which I see from time to time in my code (even in Access 2007).  There must have been a breakpoint on that line at one time, which was removed (but not entirely!).  The code still stops on the line that had the breakpoint, but it has the yellow highlight instead of the usual dark red breakpoint highlight.  Use F5 to continue running the code, and when it is done, select Clear All Breakpoints from the Debug menu in the VBA window.  That should clear the breakpoint and let the code run without interruption in future.