Visual Basic for Applications

VBA Visual Basic for Applications (VBA)Excel BasicOffice VBA File FormatVisual BasicVisual Basic macros
Visual Basic for Applications (VBA) is an implementation of Microsoft's event-driven programming language Visual Basic 6, which was declared legacy in 2008, and its associated integrated development environment (IDE).wikipedia
157 Related Articles

Microsoft Excel

ExcelXLSMS Excel
For example, VBA can automatically create a Microsoft Word report from Microsoft Excel data that Excel collects automatically from polled sensors. Code written in VBA is compiled to Microsoft P-Code (pseudo-code), a proprietary intermediate language, which the host applications (Access, Excel, Word, Outlook, and PowerPoint) store as a separate stream in COM Structured Storage files (e.g., or ) independent of the document streams.
It features calculation, graphing tools, pivot tables, and a macro programming language called Visual Basic for Applications.

Visual Basic

VBVisual Basic 6Microsoft Visual Basic
Visual Basic for Applications (VBA) is an implementation of Microsoft's event-driven programming language Visual Basic 6, which was declared legacy in 2008, and its associated integrated development environment (IDE). Despite its resemblance to many old BASIC dialects (particularly Microsoft BASIC, from which it is indirectly derived), VBA is incompatible with any of them except Visual Basic, where source code of VBA modules and classes can be directly imported, and which shares the same library and virtual machine.
A dialect of Visual Basic, Visual Basic for Applications (VBA), is used as a macro or scripting language within several Microsoft applications, including Microsoft Office.

Microsoft Office

OfficeMS OfficeMicrosoft Office Suite
VBA is built into most Microsoft Office applications, including Office for Mac OS X (except version 2008), and other Microsoft applications, including Microsoft MapPoint and Microsoft Visio.
Over the years, Office applications have grown substantially closer with shared features such as a common spell checker, OLE data integration and Visual Basic for Applications scripting language.

Macro (computer science)

macromacrosmacro language
It supersedes and expands on the abilities of earlier application-specific macro programming languages such as Word's WordBASIC.
It can record into a register (macro) what a person types on the keyboard and it can be replayed or edited just like VBA macros for Microsoft Office.

OLE Automation

AutomationAutomation ObjectsCOM/OLE Automation
VBA can, however, control one application from another using OLE Automation.
Automation was designed with the ease of scripting in mind, so controllers often provide languages such as Visual Basic for Applications to end users, allowing them to control automation objects via scripts.

Microsoft MapPoint

VexcelMapPoint 2000MapPoint
VBA is built into most Microsoft Office applications, including Office for Mac OS X (except version 2008), and other Microsoft applications, including Microsoft MapPoint and Microsoft Visio.
It includes all of the functionality of the most recent version of Streets and Trips, the consumer mapping software, at the time of development, as well as integration with Microsoft Office, data mapping from various sources including Microsoft Excel and a Visual Basic for Applications (VBA) interface allowing automation of the MapPoint environment.

WordBASIC

It supersedes and expands on the abilities of earlier application-specific macro programming languages such as Word's WordBASIC.
It was replaced by Visual Basic for Applications (VBA) when Word 97 was released.

Microsoft Word

WordMS WordWord for Windows
For example, VBA can automatically create a Microsoft Word report from Microsoft Excel data that Excel collects automatically from polled sensors. It supersedes and expands on the abilities of earlier application-specific macro programming languages such as Word's WordBASIC. Code written in VBA is compiled to Microsoft P-Code (pseudo-code), a proprietary intermediate language, which the host applications (Access, Excel, Word, Outlook, and PowerPoint) store as a separate stream in COM Structured Storage files (e.g., or ) independent of the document streams.
The language was originally WordBasic, but changed to Visual Basic for Applications as of Word 97.

ArcGIS

ArcGIS ExplorerArcGIS DesktopArcCatalog
VBA is also implemented, at least partially, in applications published by companies other than Microsoft, including ArcGIS, AutoCAD, CorelDraw, LibreOffice, Reflection, SolidWorks, WordPerfect, and UNICOM System_Architect (which supports VBA 7.1).
In the transition to ArcGIS, Esri dropped support of its application-specific scripting languages, Avenue and the ARC Macro Language (AML), in favour of Visual Basic for Applications scripting and open access to ArcGIS components using the Microsoft COM standards.

Microsoft Access

AccessMS AccessAccess 2000
Code written in VBA is compiled to Microsoft P-Code (pseudo-code), a proprietary intermediate language, which the host applications (Access, Excel, Word, Outlook, and PowerPoint) store as a separate stream in COM Structured Storage files (e.g., or ) independent of the document streams.
Like other Microsoft Office applications, Access is supported by Visual Basic for Applications (VBA), an object-based programming language that can reference a variety of objects including the legacy DAO (Data Access Objects), ActiveX Data Objects, and many other ActiveX components.

AutoCAD

Autodesk AutoCADAutoCAD ElectricalAutoCAD Mechanical
VBA is also implemented, at least partially, in applications published by companies other than Microsoft, including ArcGIS, AutoCAD, CorelDraw, LibreOffice, Reflection, SolidWorks, WordPerfect, and UNICOM System_Architect (which supports VBA 7.1).

CorelDRAW

Corel DrawCorelDraw Graphics SuiteCDR
VBA is also implemented, at least partially, in applications published by companies other than Microsoft, including ArcGIS, AutoCAD, CorelDraw, LibreOffice, Reflection, SolidWorks, WordPerfect, and UNICOM System_Architect (which supports VBA 7.1).
With version 10, support for VBA (Visual Basic for Applications) was introduced for scripting by what Corel calls now macros.

LibreOffice

LibreOffice ImpressLibreOffice OnlineLibre Office
VBA is also implemented, at least partially, in applications published by companies other than Microsoft, including ArcGIS, AutoCAD, CorelDraw, LibreOffice, Reflection, SolidWorks, WordPerfect, and UNICOM System_Architect (which supports VBA 7.1).
LibreOffice Basic is a programming language similar to Microsoft Visual Basic for Applications (VBA) but based on StarOffice Basic.

Microsoft PowerPoint

PowerPointPPTMicrosoft PowerPoint Viewer
Code written in VBA is compiled to Microsoft P-Code (pseudo-code), a proprietary intermediate language, which the host applications (Access, Excel, Word, Outlook, and PowerPoint) store as a separate stream in COM Structured Storage files (e.g., or ) independent of the document streams.

Visual Studio Tools for Applications

VSTA
Those customization abilities can be used by end-users to tailor the ISV's application within a managed extensibility environment just like Visual Basic for Applications.

Active Scripting

Active ScriptActiveScriptASP
One of its significant features was that the interfaces to the technology were available via Active Scripting (VBScript and JScript), allowing even .NET-unaware applications to be scripted via .NET languages.
Active Scripting can also be used for general-purpose scripting, such as database programming, text-processing, rapid prototyping, and application macro/scripting programming; some applications use Active Scripting as the main automation method, others do not have a macro facility but the components are available for use via the API; or one may opt to add a language and/or tool not available by default, like programming Microsoft Excel in Perl or REXX rather than Visual Basic for Applications (VBA) or transferring data from a terminal emulator to word processor by way of a spreadsheet when they have dissimilar macro tools or none at all.

Microsoft Office for Mac 2011

Office 2011Office for Mac 2011Microsoft Office 2011 for Mac
VBA was restored in Microsoft Office for Mac 2011.
Support for Visual Basic for Applications macros has returned after having been dropped in Office 2008.

BASIC

BASIC programming languageGOSUBcompiled BASIC
Despite its resemblance to many old BASIC dialects (particularly Microsoft BASIC, from which it is indirectly derived), VBA is incompatible with any of them except Visual Basic, where source code of VBA modules and classes can be directly imported, and which shares the same library and virtual machine.
WSH also has a Visual Basic for Applications (VBA) engine installed as the third of the default engines along with VBScript, JScript, and the numerous proprietary or open source engines which can be installed like PerlScript, a couple of Rexx-based engines, Python, Ruby, Tcl, Delphi, XLNT, PHP, and others; meaning that the two versions of Basic can be used along with the other mentioned languages, as well as LotusScript, in a WSF file, through the component object model, and other WSH and VBA constructions.

Visual Basic .NET

VB.NETVisual Basic.NETVisual Basic
Compatibility ends with Visual Basic version 6; VBA is incompatible with Visual Basic .NET (VB.NET).

Microsoft Office 2008 for Mac

Office 2008Microsoft Office 2008Office 2008 for Mac
Microsoft dropped VBA support for Microsoft Office 2008 for Mac.
Microsoft Visual Basic for Applications is not supported in this version.

Microsoft BASIC

Microsoft Extended BASICStandalone Disk BASIC-86Standalone Disk BASIC
Despite its resemblance to many old BASIC dialects (particularly Microsoft BASIC, from which it is indirectly derived), VBA is incompatible with any of them except Visual Basic, where source code of VBA modules and classes can be directly imported, and which shares the same library and virtual machine.

Visual Studio Tools for Office

VSTOVSTO solutions
Extensions to Office prior to Office 2003 only allowed the creation of COM add-ins using Visual Basic or Visual C++ and a "Developer" edition was also offered that enabled VBA developers to create COM Add-ins.

Microsoft Visual Studio

Visual StudioVisual Studio 2005Visual Studio 2008
Microsoft also announced Visual Studio Tools for Applications as the successor to Visual Basic for Applications (VBA) and VSA (Visual Studio for Applications).

OpenOffice Basic

StarOffice BasicLibreOffice BasicStarBasic
Although OpenOffice Basic is similar to other dialects of BASIC, such as Microsoft's Visual Basic for Applications (VBA), the application programming interface (API) is very different, as the example below of a macro illustrates.