{{language|VBA |exec= machine |LCT=no }} {{implementation|Visual Basic}} {{Wikipedia|Visual Basic for Applications}} '''Visual Basic for Applications''' ('''VBA''') is an implementation of Microsoft's event-driven programming language [[:Category:Visual Basic|Visual Basic]], and associated [[IDE]], which is built into most [[wp:Microsoft Office|Microsoft Office]] applications. It was included in Office applications (apart from version 2008 for [[Mac OS X]]), other Microsoft applications such as [[wp:MapPoint|MapPoint]] and [[wp:Microsoft Visio|Visio]], and at least partially implemented in some other applications such as [[wp:AutoCAD|AutoCAD]], [[wp:WordPerfect|WordPerfect]] and [[wp:ArcGIS|ArcGIS]]. It supersedes and expands on the capabilities of earlier application-specific macro programming languages such as Word's [[wp:Microsoft Word#Macros|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.

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 [[wp:OLE Automation|OLE Automation]].

VBA has some important limitations, such as restricted support for function pointers which are used as callback functions in the [[wp:Windows API|Windows API]]. It has the ability to use (but not create) (ActiveX/COM) DLLs, and later versions add support for class modules.

As far was Rosetta Code is concerned, Visual Basic and VBA are ''mostly'' interchangeable, with minimal editing necessary to move from one to the other.