Using a Stop Statement

As an alternative to setting a breakpoint, you can put a Stop statement in a procedure. Visual Basic enters break mode whenever it encounters a Stop statement. A Stop statement is very similar to a breakpoint, but it isn't set or cleared the same way a breakpoint would be.

Note

There is one important difference between a Stop statement and a breakpoint. If you close the workbook or quit Microsoft Excel, all breakpoints are cleared. Stop statements are more permanent; they stay in the code until you remove them.