Microsoft Office Tutorials and References
In Depth Information
Chapter 1: What the Heck Is VBA?
Chapter 1: What the Heck Is VBA?
In This Chapter
Understanding Visual Basic for Applications (VBA) code
Working with VBA code
Using Visual Basic Editor
Working with other people’s code
Visual Basic for Applications, often abbreviated VBA, is a programming
language that you can use to extend the functionality of Microsoft Access
and other products in the Microsoft Office suite of programs. A programming
language is a means of writing instructions for the computer to execute (per-
form). Programmers often refer to the written instructions as code because
the instructions aren’t in plain English. Rather, they’re in a language that the
computer can interpret and execute.
You can create sophisticated Access databases without using VBA at all. In
most cases, the other objects offered by Access — tables, queries, forms,
reports, and macros — offer more than enough flexibility and power to
create just about any database imaginable. Once in a while, though, you want
to do something that none of those other objects can do. That’s where VBA
comes in. If you can find no other way to accomplish some goal in Access,
writing VBA code usually is the solution.
Getting Acquainted with VBA Code
So what the heck is VBA code, anyway? To the untrained eye, VBA code
looks like gibberish — perhaps some secret code written by aliens from
another planet. But to Access, the code represents very specific instructions
on how to perform some task.
Within any given database, Access stores code in two places:
Class modules (code-behind forms): Every form and report you create
automatically contains a class module (also called a code-behind form) ,
as illustrated in Figure 1-1. The class module for a given form or report
is empty unless you place controls in that form or report that require
VBA code.
Search JabSto ::




Custom Search