Chapter 6. Writing Code for Use by Others

Programming Excel for personal use is very common and it’s how most of us get started. But what happens when you graduate to creating code for others? Once your audience expands from just yourself to your friends, your coworkers, or even the world, you’ll find that expectations change—it’s no longer OK if a procedure occasionally fails or that you have to know where to copy files to make them work. In short, programming for a wide audience requires a new set of skills.

This chapter walks you through the process of developing and distributing Excel Visual Basic code as workbooks, templates , and add-ins. I include information about testing your code because that’s probably the most important (and most overlooked) aspect of Visual Basic programming.

Tip

Code used in this chapter and additional samples are available in ch06.xls, ch06.xlt, ch06.xla, ch06TemplateSetup.vbs, ch06AddinSetup.vbs, and ch06AddinRemove.vbs.

Get Programming Excel with VBA and .NET now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.