|
What is Visual Basic for Applications (VBA) ?
Rodney POWELL
Microsoft MVP - Excel |
|
Visual Basic, itself, is a high-level programming
environment developed by Microsoft Corporation. It
facilitates rapid application development beyond
lower-level languages, such as C++, and it is as easy to
use as probably any programming language available
today. Nonetheless, Visual Basic provides the computer
power-user with a set of robust tools that are almost as
versatile as the developer’s imagination.
Today there are several variations of Visual Basic. The
first is available as a standalone version (which, in
itself, is marketed in a few different editions). The
second is an implementation of Visual Basic geared to
controlling features specific to other applications.
These include the various components of Microsoft Office
and, as of 1996, some third party applications.
Visual Basic for Applications (or VBA) is the name of
this strain, which will be the topic of our attention.
Also in 1996, Microsoft added a third subset, called
Visual Basic Script, to provide automation that
compliments hypertext markup language (HTML) in
Internet/intranet development. Microsoft has engineered
each of these flavors of Visual Basic on the same
foundation so the code is mostly compatible from one to
the other.
Historically, several Microsoft Office applications had
their own automation languages: Microsoft Word had
WordBasic, Microsoft Access had both macros and
Access Basic, and Microsoft Excel had its own macro
language. There were problems with the differences
between each of the automation tools in the
Microsoft Office applications. There were subtle
differences in syntax and capabilities that made it
difficult to develop solutions integrating the various
Microsoft products. Also, it was difficult for
power-users to develop a skill set that was transferable
across the whole Microsoft Office suite. Microsoft’s
answer to these challenges was to introduce VBA. Today
VBA is the common programming language used to
manipulate other Microsoft other applications, including
Excel.
Microsoft Excel version 5.0 was the first Microsoft
application to harness VBA. While Microsoft continued
to support an older style of macro functions in
Microsoft Excel, the powerful, full-featured VBA
programming language has made it a full-featured
development environment. VBA was presented as the
"glue" to integrate the Microsoft Office applications.
You can use VBA to automate repetitive tasks and to
apply custom command buttons, dialog boxes, menus, and
messages. VBA enables you to add custom features of
your own to the popular applications that already exist
on most office desktops. Today, VBA is more than just
the "glue," and far supersedes the primitive macro
scripting of years past. VBA is the tool kit needed to
build powerful, new full-featured programs that help
you get the most from the world’s most popular host
applications.
Something to add?
Let me know.
|
|
|
|