logo
search
VBA & Macro Problems

Excel VBA User-Defined Functions Not Working in Excel for the Web

Jason MillerJason Miller Oct 23, 2026 868 views

Question details

Users need to know if VBA user-defined functions can run in Excel for the web and how to handle workbooks containing them online.

Excel VBA User-Defined Functions Support in Excel for the Web
Product
Excel
Device & OS
Web, Android, iOS, Windows, macOS
Scenario
Opening and attempting to use an Excel workbook that contains custom VBA user-defined functions in a web browser or mobile application.
Observed behavior
The VBA user-defined functions execute perfectly in the desktop version of Excel but fail to work, return errors, or remain unsupported when the same file is opened in Excel for the web, Android, or iOS.
Before you start

Verify whether you are currently accessing your workbook through a web browser, a mobile app, or a desktop application, as VBA execution capabilities are strictly limited to local desktop environments.

Solution 1Recommended

Open the Workbook in the Desktop Application

Since VBA is only supported on Windows and macOS desktop versions, transitioning your session from the web to the desktop app is the most straightforward fix.

Excel for the web cannot process Visual Basic for Applications (VBA) code. To utilize your custom functions, you must launch the file using the full desktop software.

1
Access the Web Ribbon

While viewing your workbook in Excel for the web, locate the ribbon menu at the top of the screen.

2
Switch to Desktop App

Click the 'Viewing' or 'Editing' button on the ribbon, then select 'Open in Desktop App' from the dropdown menu to launch the file in your local Excel program.

3
Enable Macros

Once the file opens in the desktop version, click 'Enable Content' in the yellow security warning bar to allow your VBA user-defined functions to run.

Open the Workbook in the Desktop Application
Automatic Syncing: Any changes made and calculated using VBA in the desktop app will automatically sync back to the cloud version of the file once saved.
Free Microsoft Office alternative

Use WPS Office for Powerful VBA and Macro Support

If you need a reliable desktop solution to run complex VBA user-defined functions without the high subscription costs of Microsoft Office, WPS Office is a lightweight, highly compatible alternative that natively supports macros.

  1. 1. Download WPS Office: Visit the official WPS website and download the desktop version of WPS Office.
  2. 2. Open Your Macro File: Launch WPS Spreadsheets and open your .xlsm file containing the user-defined functions.
  3. 3. Enable and Run Macros: Accept the security prompt to enable macros, and your VBA functions will calculate just as they do in desktop Excel.
Fully compatible with Microsoft Excel (.xlsx, .xlsm) macro-enabled formatsRobust built-in support for VBA macros and user-defined functions on desktopLightweight application with a familiar user interface that requires zero learning curveCost-effective and accessible alternative for heavy spreadsheet users
microsoft office alternative - wps office

Frequently Asked Questions

Why does my Excel file show a macro warning in the web version?

Excel for the web cannot execute VBA macros. It will display a warning notifying you that the workbook contains macros and will require you to open the file in a desktop application to run that specific content.

Will Office Scripts entirely replace VBA in Excel?

Office Scripts are designed specifically for cloud-based automation in Excel for the web and work across mobile platforms. While they serve as a modern alternative to VBA for web users, VBA remains fully supported and heavily utilized in desktop versions of Excel.

Can I run Excel macros or user-defined functions on an iPad or Android tablet?

No, VBA macros and User-Defined Functions are strictly unsupported on iOS or Android versions of Excel. To use these functions, you must access the file using a Windows or macOS desktop computer.