O'Reilly logo

Excel® VBA: 24-Hour Trainer by Tom Urtis

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 17. Debugging Your Code

Despite what you've always heard, there are really three sure things in life: death, taxes, and errors in computer programs. There's no avoiding it — errors will happen and they will need to be fixed, whether the length of your VBA programming experience is 10 days or 10 years.

You will need to learn the tools and techniques for debugging your code, so that when things go wrong, you'll be familiar with the resources that are at your disposal for finding and fixing errors. Excel has many good built-in debugging tools. In addition, other techniques exist that you'll learn in this lesson about how to avoid errors in the first place, and, believe it or not, how you can get errors to work for you instead of against you.

WHAT IS DEBUGGING?

A bug is an error in your code that can produce erroneous results, or, depending on the nature of the bug, stop the code from executing altogether. In programming, the term debugging refers to correcting an error in code, or the process of testing a procedure for the possible existence of bugs that would need to be fixed if found.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required