EXCEL4
EXCEL4
Welcome to your fi rst lesson in Excel VBA 24-Hour Trainer! A good place to start is at
the beginning, where you’ll fi nd it useful to get an understanding of where Visual Basic for
Applications (VBA) comes from and what VBA is today. After you get a feel for how VBA fi ts
into the overall Excel universe, you fi nd out how to use VBA to manipulate Excel in ways you
might never have thought possible.
WHAT IS VBA?
VBA is a programming language created by Microsoft to automate operations in applications
that support it, such as Excel. VBA is an enormously powerful tool that enables you to control
Excel in countless ways that you cannot do—or would not want to do—manually.
In fact, VBA is also the language that manipulates Microsoft Offi ce applications in Access, Word,
PowerPoint, and Outlook. For the purposes here, VBA is the tool you use to develop macros and
manipulate objects to control Excel and to control other Offi ce applications from Excel.
You do not need to purchase anything more than the Offi ce suite (or the individual application)
to also own VBA. If you have Excel on your computer, you have VBA on your computer.
WHAT IS A “MACRO,” ANYWAY?
Back in the day, a programming language was often called a “macro language” if its
capabilities included the automation of a sequence of commands in spreadsheet or
word-processing applications. With Microsoft’s release of Offi ce 5, VBA set a new
bar for how robust a programming language can be, with capabilities extending far
beyond those of earlier programming languages, such as the ability to create and
control objects within Excel or to have access to disk drives and networks.
1
continues