Yes, VBA (Visual Basic for Applications) is included in Excel. Every desktop version of Microsoft Excel—whether you buy it outright, get it through Microsoft 365, or install it as part of Office—ships with the VBA editor and the ability to run macros. There is no separate purchase, add-in, or subscription required to write and run VBA code. The one important exception is Excel for the web, which does not include the VBA editor and cannot run macros; you need the desktop application for that.

What VBA Actually Is and Where It Lives

VBA is a programming language built into most Microsoft Office applications, including Excel, Word, Access, and Outlook. In Excel, it is the engine behind macros—the recorded or hand-written scripts that automate repetitive tasks. The editor itself is not visible on the ribbon by default. To open it, press Alt+F11 on Windows or Fn+Alt+F11 on a Mac, or go to the Developer tab and click Visual Basic. If you do not see a Developer tab, you can enable it through File > Options > Customize Ribbon and checking the Developer box. Menu labels can differ slightly by version and platform, but the core path has stayed consistent for years.

Inside the editor you will find a Project Explorer listing your open workbooks, a Properties window, and a code window where you write procedures. Code is stored inside the workbook file itself, which is why a macro-enabled file carries the .xlsm extension rather than the standard .xlsx. That distinction matters: if you save a workbook containing macros as .xlsx, Excel strips the code out and warns you before doing so.

Which Excel Versions Include VBA

The short answer is that any Excel you install on a Windows PC or a Mac includes VBA. That covers Excel 2010 through the current Microsoft 365 desktop app. The differences are in support and updates, not in whether the feature exists.

  • Microsoft 365 desktop Excel (Windows and Mac): Full VBA editor, macro recording, and the ability to run existing macros.
  • Excel 2019, 2021, and 2024 (perpetual licenses): Full VBA editor and macro support.
  • Excel for the web: No VBA editor. You can open a workbook that contains macros, but the macros will not run, and you cannot record or edit them in the browser.
  • Excel mobile apps (iOS and Android): No VBA editor. Macros do not run on phones or tablets.

So if someone tells you VBA is “not in Excel,” they are almost certainly looking at the web or mobile version, or they have not enabled the Developer tab and assume the feature is missing.

How to Confirm VBA Is Available on Your Copy

You can verify in under a minute. The steps are for the desktop app; the web version has no equivalent because the editor is not there.

  1. Open Excel and create a blank workbook.
  2. Press Alt+F11 (Windows) or Fn+Alt+F11 (Mac). If the Visual Basic editor opens, VBA is present.
  3. Alternatively, enable the Developer tab via File > Options > Customize Ribbon, then click Developer > Visual Basic.
  4. In the editor, look for “VBAProject” in the Project Explorer on the left. That confirms the workbook is ready to hold code.

If Alt+F11 does nothing, check whether you are in Excel for the web (the browser tab will show a web address rather than a local file) or whether a system policy has disabled macros. In managed corporate environments, administrators can block macro execution through Trust Center settings, which makes VBA appear broken even though it is installed.

Macro Security and the Trust Center

Because VBA can automate almost anything a user can do—including opening files, changing data, and interacting with other applications—Excel treats macros as a security risk. The Trust Center (File > Options > Trust Center > Trust Center Settings) controls how macros behave. The default is usually “Disable all macros with notification,” which shows a yellow bar when a workbook contains code. You then choose to enable content for that session.

Files downloaded from the internet carry a Mark of the Web, and recent versions of Office block macros in those files by default unless you unblock them in the file's properties. This is a safety feature, not a sign that VBA is missing. Only enable macros in workbooks you trust or have written yourself. A macro can delete data or send files elsewhere, so treat an unknown .xlsm file the same way you would treat an unknown executable.

Common Misconceptions About VBA in Excel

Several persistent myths cause confusion. One is that VBA was removed or deprecated. Microsoft has not removed VBA from desktop Office; it remains supported and is still the language behind recorded macros. Another is that you need a separate “developer” license. You do not—the editor is part of the standard install. A third is that macros work everywhere. They do not: the web and mobile versions cannot run them, and files with macros may be blocked by email systems or organizational policy.

It is also worth distinguishing VBA from newer automation tools. Power Query and Office Scripts are separate features. Office Scripts, in particular, is a TypeScript-based automation feature that runs in Excel for the web and in desktop Excel, but it is not VBA and does not replace the VBA editor. If you need to automate a desktop workflow with full access to the object model, VBA remains the built-in option.

Frequently Asked Questions

Is VBA free with Excel?

Yes. VBA is part of the Excel application you already have. There is no add-on purchase, and no separate subscription. You pay for Excel itself, and the editor comes with it on desktop.

Why can't I find the Developer tab?

The Developer tab is hidden by default. Enable it through File > Options > Customize Ribbon and check the Developer checkbox in the right-hand list. On Mac, the path is Excel > Preferences > Ribbon & Toolbar, and the labels can vary slightly by version.

Can I use VBA in Excel for the web?

No. Excel for the web can open workbooks that contain macros, but it cannot run, record, or edit them. You need the desktop app for any VBA work.

Do macros work on Excel for Mac?

Yes, the desktop version of Excel for Mac includes the VBA editor and can run macros. Some Windows-specific code that calls system APIs will not work on Mac, but standard Excel automation does.

Is VBA being discontinued?

Microsoft has not announced the removal of VBA from desktop Office. It remains a supported feature and is still used for macro recording. Newer tools like Office Scripts exist alongside it rather than replacing it.

Why does Excel block my macro?

Macro blocking is a security setting, not a missing feature. Check the yellow message bar, the Trust Center settings, and the file's properties if it came from the internet. Only enable macros in files you trust.