Using Stop Statements


Entering a Stop statement in your code is the same as entering a breakpoint except it is in your code. When VBA encounters a Stop statement, it halts execution and switches to break mode. Although Stop statements act like breakpoints, they are not set or cleared in the same way.

If you set breakpoints using F9 , when you leave your project and then reload it, the breakpoints are all cleared. However, Stop statements form part of the code and are only cleared when you delete them or put a single quote (') character in front to change them into a comment. Make sure that once you have your code working properly, you remove all Stop statements.




Excel VBA Macro Programming
Excel VBA Macro Programming
ISBN: 0072231440
EAN: 2147483647
Year: 2004
Pages: 141

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net