O'Reilly logo

VB & VBA in a Nutshell: The Language by Paul Lomax

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

1.1. What Is VBA?

Visual Basic for Applications is a hosted language and part of the Visual Basic family of development tools. Although VBA can be thought of as sitting below the retail version of VB and above VBScript in the VB hierarchy, VBA is actually an essential element of the retail version of VB, providing the vast majority of language elements used in VB. When hosted in VB, VBA provides language support and an interface for forms, controls, objects, modules, and data-access technologies. When hosted in other applications such as Word or Excel, VBA, using a technology called automation , provides the means of interacting with and accessing the host application's object model, as well as the object models of other applications and components.

In order to customize complex applications such as Excel, Word, Access, and a growing number of other applications from Microsoft and other vendors, VBA allows the developer to provide solutions that take advantage of sophisticated components that have been tried and tested. VBA is a glue language: a language that interfaces with the various objects that make up an application via the host application's object model. VBA is the means by which applications can become extensible, and it's ActiveX (or OLE automation) that provides the interface between VBA and its host application. It's this support for OLE automation that makes VBA an outstanding tool for rapidly developing robust Windows applications.

Until the launch of VBA 5.0 in ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required