1.3 VBA Language Specification Overview

VBA is a computer programming language that is intended to be used in conjunction with a host software application such as a word processor. In such a situation, the end-user of such a host application uses the VBA language to write programs that may access and control the host application’s data and functionality.

This document is an implementation-independent specification of the VBA language that enables the creation of independent implementations. It enables the creation of source code compatible implementations of the language by defining the required characteristics and behaviors of the source language that must be supported by all conforming implementations. It enables a programmer to write portable VBA programs by defining the exact set of implementation independent characteristics and behaviors of the language that a program may use if it is intended to run on multiple implementations.

The scope of the VBA Language Specification is the implementation independent, operating system independent core programming language that must be supported by all conforming VBA implementations. It includes all features and behaviors of the language that must exist and behave identically in all conforming implementations. Such features include the intrinsic functions that must exist in conforming implementations.

This specification defines the syntax, static semantics, and runtime semantics of the VBA language. Syntax defines the source code representation of VBA programs that must be recognized by a VBA implementation. Static semantics define non-syntactic program validity requirements that cannot be expressed using the grammar. Runtime semantics define the computational behavior of VBA programs that conform to the specified syntax and static semantics rules. The runtime semantics describes what it means to execute a VBA program but not how a VBA implementation might accomplish this.

The VBA Language Specification does not define how a VBA implementation would actually achieve the requirements of the specification nor does it describe the specific design of any VBA Language Implementation.

The language defined by this specification is that language implemented by Microsoft Visual Basic for Applications 7.0 (VBA 7.0), as shipped in Microsoft Office 2010 suites; and VBA version 7.1, as shipped in Microsoft Office 2013. It includes features that provide source code backward-compatibility for VBA programs written for prior Microsoft versions of VBA.

Show: