Skip to main content

Visual Basic for Applications; a subset of Visual Basic used in all Microsoft Office applications. Consider using this tag together with the tag for the specific application in question. Good questions on VBA generally contain some code and asks for solution of specific issues. Questions asking for entire solutions (please give me the code / how to do this and this with VBA) are off topic and will be closed as too broad.

Visual Basic for Applications (VBA) is the programming language for Microsoft Office and its associated applications, including Word, Excel, PowerPoint, Outlook, and Access. Users can write sub-routines that execute these actions and methods and interact with the application. Typically this is started by enabling developer tools in a Microsoft Office application. If you're a Pascal or C programmer, you'll find all the program structures you're used to.

Getting started with VBA

List of actions & methods

Note that you always can press F1 within any VBA editor to get a similar list.

Code Language (used for syntax highlighting): lang-vb