VBA Macros Not Working on Mobile Excel: Fix Guide
In this article
VBA macros do not work on Excel for iPhone, iPad, Android, or Excel for the web, and there is no setting that turns them on. Microsoft's mobile Excel apps and the browser version do not include a VBA engine, so any .xlsm file you open there will show its saved values and formulas but the macros will not run, and you cannot record or edit them. The practical fix is to run the macro on a Windows or Mac desktop copy of Excel, or replace the macro with a mobile-friendly alternative such as Office Scripts (for Excel for the web and Windows), Power Automate, or plain formulas and data validation. This guide explains what actually works, how to move work between desktop and mobile, and what to check when a file that should be macro-free still misbehaves.
What You'll Need
- A Windows PC or Mac with a desktop version of Microsoft Excel that supports VBA (Microsoft 365, Excel 2021, 2019, or 2016).
- The original macro-enabled workbook (.xlsm or .xlsb) stored in OneDrive or SharePoint so both devices can reach it.
- The Excel mobile app from the official App Store or Google Play, signed in with the same Microsoft account.
- For script-based alternatives: access to Office Scripts through Excel for the web or a qualifying Microsoft 365 plan, or a Power Automate account.
- Optional: a desktop macro that exports results to a separate, macro-free .xlsx file for mobile viewing.
Step-by-Step
- Confirm the file is macro-enabled. On desktop, open the workbook and check the title bar or the file extension. If it ends in .xlsx, it cannot contain VBA at all; save a copy as .xlsm before adding code. If it ends in .xlsm or .xlsb, the macros are there but the mobile app simply will not execute them.
- Run the macro on desktop first. Open the .xlsm file in desktop Excel, enable macros if prompted (use the yellow security bar and choose Enable Content only for files you trust), then run the macro with Alt+F8 on Windows or by opening the Developer tab and choosing Macros. Confirm the output is correct before sharing the file.
- Save the results, not the macro, for mobile use. After the macro finishes, use File > Save As and choose Excel Workbook (.xlsx) to create a macro-free copy containing only the finished values. Store that copy in OneDrive or SharePoint. The mobile app opens .xlsx files normally and shows the calculated results.
- Open the file on mobile from within Excel. Launch the Excel app, go to the Open tab, and pick the file from OneDrive, SharePoint, or the device. Opening it from a file manager or email attachment can sometimes open a read-only preview; opening from inside the app is more reliable.
- Check what mobile Excel can and cannot do with the file. You can view values, edit formulas, sort and filter, and add comments. You cannot run, record, or edit VBA, and the Developer tab is not available. If a button on the sheet is assigned to a macro, tapping it does nothing on mobile.
- Replace the macro with a mobile-friendly method if you need interaction on the phone. For simple calculations, use formulas, data validation lists, and conditional formatting instead of VBA. For repeatable automation, build an Office Script in Excel for the web (Automate tab > New Script) or a Power Automate flow that runs on a schedule or button, then let the mobile app work with the results. Office Scripts use JavaScript and run in Excel for the web and Windows; they are not available in the mobile apps either, but the flow or script can run elsewhere and update the workbook.
- Set up a desktop-to-mobile handoff routine. Keep the master .xlsm on the desktop, run macros there, and save the output .xlsx to the shared folder. On mobile, work only with the .xlsx copy. This avoids confusion about why buttons and macros do nothing.
- If you only need to view a macro workbook on a tablet, consider Excel for the web in a browser. Excel for the web also does not run VBA, but it opens .xlsm files and displays their contents. It is useful for reading, not for executing code.
Common Mistakes
- Expecting a hidden setting to enable VBA on mobile. There is none; the feature is not built into the mobile apps.
- Saving the macro-enabled .xlsm file as the only copy and then wondering why mobile edits do not trigger calculations that depend on macros.
- Tapping a macro-assigned button on a phone and assuming the app is broken. The button is inert on mobile by design.
- Using an .xlsx file and expecting macros to appear later. The .xlsx format cannot store VBA; you must save as .xlsm on desktop.
- Sharing a file from a personal email attachment instead of OneDrive or SharePoint, which can open a read-only copy and hide editing options.
- Confusing Office Scripts with VBA. Office Scripts are a separate JavaScript-based feature and do not run in the mobile Excel apps.
Tips
- Name the desktop master file clearly, for example Budget_Master.xlsm, and the mobile copy Budget_Mobile.xlsx, so nobody edits the wrong one.
- Add a note on the first sheet of the mobile copy explaining that macros run on desktop only, and where to find the master file.
- Use Excel's co-authoring on the .xlsx copy so multiple people can view results on phones while the macro work stays on one desktop.
- If you need a one-tap action on mobile, a Power Automate button flow can trigger a desktop or cloud process and write results back to the workbook, which the phone can then display.
- Keep macro security settings on desktop at the default "Disable all macros with notification" and enable content only for files you created or trust.
Troubleshooting
If the mobile app shows the file but values look stale, the macro may not have run on desktop before the file was saved. Reopen the .xlsm on desktop, run the macro, and save the .xlsx copy again. If the file will not open on mobile at all, check that it is stored in OneDrive or SharePoint and that you are signed in with the same account; files from unknown sources may be blocked by your organization's policy.
If a button does nothing on mobile, that is expected. If formulas show errors after a desktop macro run, the macro may have written values that depend on desktop-only features; check the formulas on desktop and replace them with mobile-compatible ones. If you see a message that macros are disabled or blocked on desktop, use the Trust Center settings under File > Options > Trust Center > Trust Center Settings > Macro Settings, and only change them if you understand the risk. Clearing app data or reinstalling the mobile app can fix sign-in glitches, but it removes local cached files, so make sure everything is saved to OneDrive first.
Frequently Asked Questions
Can I enable macros in Excel on my phone?
No. The Excel mobile apps for iPhone, iPad, and Android do not include a VBA engine, so there is no setting to turn macros on. You can view and edit the workbook's values and formulas, but VBA code will not run.
Will my .xlsm file open on mobile Excel?
Yes, it usually opens and displays its contents, but the macros will not execute. Buttons assigned to macros will not respond. For reliable mobile use, save a macro-free .xlsx copy after running the macro on desktop.
What can I use instead of VBA for automation that works with mobile Excel?
Office Scripts (available in Excel for the web and Windows) and Power Automate flows can automate tasks and update workbooks. The mobile app can then display the results. Plain formulas, data validation, and conditional formatting also work on mobile and cover many simple automation needs.
Does Excel for the web run VBA macros?
No. Excel for the web opens macro-enabled workbooks but does not run VBA. It is useful for viewing and light editing, not for executing macros.
Why does a macro button do nothing on my tablet?
Macro buttons are tied to VBA code, and the mobile apps cannot execute that code. The button is present but inactive. Use the desktop version to run it, or replace the button with a formula-driven control or a Power Automate button.
Can I record a macro on my phone?
No. Macro recording is a desktop Excel feature. The mobile apps have no macro recorder and no VBA editor.