Chapter 13

Bug Extermination Techniques

IN THIS CHAPTER

Bullet Defining a bug and knowing why you should squash it

Bullet Recognizing types of bugs you might encounter

Bullet Using techniques for debugging your code

Bullet Using the VBE’s built-in debugging tools

Bullet Presenting a handy list of bug reduction tips

If the term bugs conjures up an image of a creepy crawly, this chapter can set you straight. Simply put, a bug is an error in your programming. This chapter details programming bugs — how to identify them and how to wipe them off your module.

Species of Bugs

In programming, the term bug, as you probably know, refers to a software problem. In other words, if software doesn’t perform as expected, it has a bug. Fact is, all major software programs have bugs — lots of bugs. Excel itself has hundreds (if not thousands) of bugs. Fortunately, the vast majority of these bugs are relatively obscure and appear in only very specific circumstances.

When you write large enough VBA programs, your code probably will ...

Get Excel VBA Programming For Dummies, 6th 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.