How To Open Microsoft Visual Basic For Applications
To open Microsoft Visual Basic for Applications, launch the desktop version of Excel, Word or PowerPoint and press Alt + F11 on Windows. You can also select Developer > Visual Basic on the ribbon. If Developer is hidden, enable it through File > Options >.
Which licences fit your PC setup?
Prices are an AUD snapshot, not a live quote. Confirm variant and total on the listing.
-

Windows 11 Pro key
$14.99 AUD
$29.00 -

Office 2024 Pro Plus key
$20.00 AUD
$39.00 -

Windows 11 Home key
$18.88 AUD
$37.00
What you are opening
Visual Basic for Applications (VBA) is the programming language used to automate tasks in Office applications. The window where you write and edit that code is called the Visual Basic Editor, or VBE. You open it from the application whose files you want to work with.
For example, start in Excel to automate workbook formatting, or in Word to change document content. VBA shares concepts with other forms of Visual Basic, but instructions for standalone applications may use different tools. If the terminology is unfamiliar, read about what Visual Basic is in computing before following a programming tutorial.
Open the VBA editor on Windows
Use the keyboard shortcut
- Open Excel, Word or PowerPoint in the desktop application.
- Open the workbook, document or presentation you want to use, or create a blank file.
- With the Office application active, press Alt + F11.
The Visual Basic Editor should appear in a separate window. This shortcut lets you open the editor without first displaying the Developer tab.
Use the Developer tab
If you prefer the ribbon, enable Developer in the application you are using:
- Select File > Options.
- Select Customize Ribbon.
- In the list on the right, select Main Tabs if necessary.
- Tick Developer, then select OK.
- Open the Developer tab and select Visual Basic.
Microsoft documents this ribbon setting in its guide to showing the Developer tab. The interface may display the US spelling “Customize”, even when you normally use British or Australian spelling.
Choose the correct Office application
In Excel, these steps open the editor for workbook projects. In Word, they open the editor for document and template projects. In PowerPoint, they open the editor for presentation projects. Start from the relevant application rather than opening Excel to edit a Word macro.
Select Visual Basic when you want to inspect or edit code. The nearby Macros button opens a list of available macros; it serves a different purpose from opening the editor directly.
Open VBA in Excel for Mac
The Windows File > Options route does not apply to Excel for Mac. To display its Developer tab:
- Open Excel and select Excel > Preferences.
- Select Ribbon & Toolbar.
- Under Customize the Ribbon, select Main Tabs and tick Developer.
- Save the change and close Preferences.
- Select Developer > Visual Basic.
These steps follow Microsoft's Developer tab guidance for Excel for Mac. Use the Mac-specific ribbon settings rather than looking for the Windows Options dialogue.
Recognise the editor and find your code
The editor contains tools for viewing VBA projects, editing procedures and investigating errors. Opening it does not automatically create a macro. A new file may have no existing code to display.
If you are following a tutorial, check which application and project it expects you to use before adding anything. Excel code refers to objects such as worksheets and ranges, while Word code works with objects such as documents and paragraphs. Similar-looking VBA syntax does not mean a procedure will work unchanged in every Office application.
For a beginner-friendly way to inspect code, Excel and Word can record supported actions as a macro. Microsoft's guide to getting started with VBA explains how recording actions can help connect familiar Office tasks with their programming instructions.
Resolve common access problems
You are using Excel in a browser
Excel for the web cannot create, run or edit VBA macros. Open the workbook in the desktop application to work with its code. Microsoft explains this limitation in its guidance on working with VBA macros in Excel for the web.
The shortcut does not respond
Try Developer > Visual Basic to check whether the issue is the keyboard shortcut. Some keyboards assign other functions to the F11 key, so you may need to hold Fn as well. Also check that the Office application has focus when you press the keys.
The editor opens, but a macro will not run
Accessing the editor and allowing code to execute are separate issues. A security restriction can prevent a macro from running. On a managed work computer, ask your IT administrator about a disabled command or policy message. Only run macros from files you trust.
Keep any VBA code you add
If you add code to the file, choose a format that preserves it when saving:
- Excel: Excel Macro-Enabled Workbook (.xlsm).
- Word: Word Macro-Enabled Document (.docm).
- PowerPoint: PowerPoint Macro-Enabled Presentation (.pptm).
The standard .xlsx, .docx and .pptx formats cannot retain VBA code. Microsoft's explanation of Office file formats and extensions covers this distinction.
For further learning, browse the Visual Basic guides. When exploring a specific feature, such as adding sound in Visual Basic, check that the example targets the environment you are using before adapting its code.
Now open a blank workbook in desktop Excel and select Developer > Visual Basic to locate the editor before working on an important file.
Other editions for separate workloads
Other editions for separate workloads; prices in AUD, confirm the total on the listing.
-

Windows 10 Pro key
$12.00 AUD
$15.00 -

Microsoft 365 Pro Plus, 5 devices
$15.00 AUD
$29.00 -

Windows Server 2022 Standard
$120.00 AUD
$239.00
How to check this worked
- Open Settings, System, Activation and confirm the edition shown.
- Enter the key and run activation; expect a green tick within a minute.
- Reboot and re-check activation survives the restart.
FAQ
What else should you know before buying?
- What do I need before starting?
- Read the requirements and confirm the edition first; the steps assume the machine is compatible.
- How do I know the licence is genuine?
- Activate on Microsoft's servers and check Settings, System, Activation. A working activation is the test.
- Is this a subscription?
- Keys sold here are one-time lifetime licences. Microsoft 365 plans are billed by Microsoft instead.
- What if the key fails?
- Email hi@ms.codes with the order number and a screenshot. Replacement or refund applies within 30 days.
Check who prepared and reviewed this guide
- Written by
- MS.Codes editorial
- Reviewed by
- Support team
Last verified: (source review; see test status above).