Datasheet

16
Part I: Introducing VBA
Creating a custom button
You can customize your Quick Access toolbar with your own buttons that
execute the macros you write. Office workers tend to be very impressed by
buttons that perform magic.
If you’re using Excel 2010, you can even add buttons to the Ribbon — something
that’s off-limits in Excel 2007.
Developing new worksheet functions
Although Excel includes numerous built-in functions (such as SUM and
AVERAGE), you can create custom worksheet functions that can greatly
simplify your formulas. I guarantee you’ll be surprised by how easy this is.
(I show you how to do this in Chapter 20.) Even better, the Insert Function
dialog box displays your custom functions, making them appear built-in. Very
snazzy stuff.
Creating complete, macro-driven
applications
If you’re willing to spend some time, you can use VBA to create large-scale
applications complete with a custom Ribbon tab, dialog boxes, on-screen
help, and lots of other accoutrements. This book doesn’t go quite that far,
but I’m just telling you this to impress you with how powerful VBA really is.
Creating custom add-ins for Excel
You’re probably familiar with some of the add-ins that ship with Excel. For
example, the Analysis ToolPak is a popular add-in. You can use VBA to
develop your own special-purpose add-ins. I developed my Power Utility
Pak add-in by using only VBA, and people all around the world pay me real
money so they can use it.
Advantages and Disadvantages of VBA
In this section, I briefly describe the good things about VBA — and I also
explore its darker side.
05_503690-ch01.indd 1605_503690-ch01.indd 16 4/12/10 11:22 PM4/12/10 11:22 PM