Chapter 16. VBA Debugging

Debugging is the most important and probably the least understood aspect of programming. No one writes perfect code on the first try. Being able to efficiently locate and correct the mistakes you’ve made is a significant part of what separates a great programmer from a skilled amateur. In this chapter we demonstrate how to use the built-in debugging features of the Visual Basic Editor (VBE) to locate and correct bugs in your code as well as provide tips and techniques that will help you become a better debugger.

Basic VBA Debugging Techniques

Run Mode Versus Break Mode

A running application can exist in one of two states. Run mode is exactly what its name suggests. The application is running normally. In break mode an application ...

Get Professional Excel Development: The Definitive Guide to Developing Applications Using Microsoft Excel, VBA, and .NET, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.