Can Excel for the Web Create or Run VBA Macros?
Question details
The user wants to know whether free Excel for the web can create, edit, or run VBA macros.

- Product
- Microsoft Excel for the web
- Device & OS
- not provided
- Scenario
- The user wants to work with VBA macros in a workbook opened in a browser.
- Observed behavior
- Excel for the web can open and edit workbooks containing VBA, but it cannot create, edit, or run the macros.
Check whether you have access to the Excel desktop app and whether the workbook is saved in a macro-enabled format such as .xlsm. Only enable macros in files from sources you trust.
Open the workbook in Excel desktop to work with VBA
Use the desktop app when you need to create, edit, or run a VBA macro.
In Excel for the web, open the workbook and select Editing > Open in Desktop App, or open the file directly in Excel on your computer.
In Excel for Windows, select File > Options > Customize Ribbon, check Developer, and select OK.
Select Developer > Visual Basic to open the VBA editor, or use Developer > Record Macro to record a new macro.
Select Developer > Macros, choose the macro, and select Run. If Excel displays a security warning, enable macros only if you trust the file.
Select File > Save As and choose Excel Macro-Enabled Workbook (.xlsm) to retain the VBA code.

Work with spreadsheets in WPS Office
WPS Office is a free, lightweight Office alternative with a familiar interface and support for common Excel formats, making it easy to move everyday spreadsheet work. It does not enable VBA macros in Excel for the web; macro support in WPS can vary by platform and edition.

Frequently Asked Questions
Can I run an existing macro in Excel for the web?
No. Open the workbook in the Excel desktop app and select Developer > Macros to run an existing macro.
Will opening a macro-enabled workbook in Excel for the web remove its macros?
Excel for the web can open and edit a workbook containing macros while preserving its existing VBA code. To view or edit the code, open the workbook in Excel desktop.
How do I enable the Developer tab in Excel for Windows?
Select File > Options > Customize Ribbon, check Developer, and select OK.
Which file format should I use to save VBA macros?
In Excel desktop, select File > Save As and choose Excel Macro-Enabled Workbook (.xlsm) to retain the VBA code.




