Datasheet

Don’t confuse VBA with VB (which stands for Visual Basic). VB is a program-
ming language that lets you create standalone executable programs (those EXE
files). Although VBA and VB have a lot in common, they are different animals.
What Can You Do with VBA?
You’re probably aware that people use Excel for thousands of different tasks.
Here are just a few examples:
Keeping lists of things such as customer names, students’ grades, or
holiday gift ideas (a nice fruitcake would be lovely)
Budgeting and forecasting
Analyzing scientific data
Creating invoices and other forms
Developing charts from data
Yadda, yadda, yadda
The list could go on and on, but I think you get the idea. My point is simply
that Excel is used for a wide variety of things, and everyone reading this book
has different needs and expectations regarding Excel. One thing virtually
every reader has in common is the need to automate some aspect of Excel.
That, dear reader, is what VBA is all about.
12
Part I: Introducing VBA
A few words about terminology
Excel programming terminology can be a bit
confusing. For example, VBA is a programming
language, but it also serves as a macro lan-
guage. What do you call something written in
VBA and executed in Excel? Is it a
macro
or is it
a
program?
Excel’s Help system often refers to
VBA procedures as
macros,
so I use that termi-
nology. But I also call this stuff a
program.
I use the term
automate
throughout this book. This
term means that a series of steps are completed
automatically. For example, if you write a macro
that adds color to some cells, prints the work-
sheet, and then removes the color, you have
auto-
mated
those three steps.
By the way,
macro
does not stand for Messy
And Confusing Repeated Operation. Rather, it
comes from the Greek
makros,
which means
large — which also describes your paycheck
after you become an expert macro programmer.
05_046746 ch01.qxp 1/12/07 6:16 PM Page 12