Visual Basic for Applications

related topics
{system, computer, user}
{math, number, function}
{work, book, publish}
{company, market, business}
{language, word, form}
{mi², represent, 1st}

Visual Basic for Applications (VBA) is an implementation of Microsoft's event-driven programming language Visual Basic 6, and associated integrated development environment (IDE), which is built into most Microsoft Office applications. VBA enables developers to build user defined functions, automate processes, and access Win32 and other low-level functionality through DLLs. It was also built into Office applications apart from version 2008 for Apple's Mac OS X, other Microsoft applications such as Microsoft MapPoint and Microsoft Visio; as well as being at least partially implemented in some other applications such as AutoCAD, WordPerfect, and ArcGIS. It supersedes and expands on the capabilities of earlier application-specific macro programming languages such as Word's WordBasic, and can be used to control many aspects of the host application, including manipulating user interface features, such as menus and toolbars, and working with custom user forms or dialog boxes. VBA can also be used to create import and export filters for various file formats, such as ODF.

As its name suggests, VBA is closely related to Visual Basic and uses the Visual Basic Runtime, but can normally only run code within a host application rather than as a standalone application. It can, however, be used to control one application from another using OLE Automation. For example, it is used to automatically create a Word report from Excel data, in turn automatically collected by Excel from polled observation sensors. The VBA IDE is reached from within an Office document by pressing the key sequence Alt+F11.

VBA is functionally rich and flexible but it does have some important limitations, such as restricted support for function pointers which are used as callback functions in the Windows API. It has the ability to use (but not create) (ActiveX/COM) DLLs, and later versions add support for class modules.

Contents

Full article ▸

related documents
Cocoa (API)
AmigaDOS
Enhanced Interior Gateway Routing Protocol
Atari BASIC
Computer program
Classless Inter-Domain Routing
Active Directory
GRASS (programming language)
Memory leak
Scalable Vector Graphics
Wikipedia:Free On-line Dictionary of Computing/C - D
HyperCard
Very long instruction word
Gnutella
VHDL
Master boot record
PHP
Diff
Filename extension
Common Object Request Broker Architecture
Endianness
Subnetwork
Superscalar
Thread (computer science)
Stream cipher
Control theory
Maildir
Vector processor
Race condition
OpenStep