Can Excel VBA Macros Run in Power Apps or Android? Solutions & Alternatives
Question details
Determine whether traditional Excel VBA macros can be executed within Power Apps or the Excel mobile app on Android, and find viable workarounds.

- Product
- Microsoft Excel, Power Apps
- Device & OS
- Android, iOS, Web
- Scenario
- Attempting to trigger or execute automated Excel scripts from a mobile device or a custom Power Apps application.
- Observed behavior
- Excel VBA macros fail to run or are completely disabled when opened in Power Apps or on mobile operating systems like Android and iOS.
Before proceeding, verify that your Microsoft 365 subscription includes access to Power Automate and the Automate tab (Office Scripts), as these cloud features are necessary to replace desktop VBA.
Convert VBA to Office Scripts for Web and Mobile Support
Office Scripts use TypeScript/JavaScript and are natively supported across Excel on the web, iOS, and Android.
VBA macros rely on the desktop version of Excel and the Windows or macOS operating system architecture. Office Scripts, on the other hand, are cloud-based and specifically designed to work anywhere, including mobile devices.
Log into your Microsoft 365 account via a web browser and open your target workbook in Excel Online.
Click on the 'Automate' tab located in the main ribbon interface.
Select 'New Script' to open the Code Editor panel. You will need to rewrite your existing VBA logic using TypeScript.
Save the newly created script. Open the same workbook using the Excel app on your Android or iOS device, navigate to the Automate tab, and tap to run the script.

Use Power Automate to Connect Power Apps and Excel
Since Power Apps cannot trigger VBA directly, use a Power Automate flow to run cloud-based Office Scripts.
Need a Reliable Desktop Suite for Advanced VBA Macros?
While VBA macros are not supported on mobile devices or cloud apps like Power Apps, desktop users still need a robust environment for their complex macro-enabled spreadsheets. WPS Office provides native desktop support for VBA on Windows, delivering full compatibility with Microsoft Excel formats in a lightweight, free-to-use application.
- 1. Download and Install WPS Office: Visit the official WPS website to download the free installation package for your Windows PC.
- 2. Open Your Macro-Enabled File: Launch WPS Spreadsheet and open your existing .xlsm files directly.
- 3. Enable Macros and Run: Accept the security prompt to enable macros, and run your VBA code seamlessly on your desktop.

Frequently Asked Questions
Why can't I run VBA macros on Excel for Android or iOS?
VBA (Visual Basic for Applications) was designed specifically for Windows and macOS desktop environments. Mobile operating systems lack the underlying COM architecture and necessary system libraries to execute traditional VBA code.
Can I use Power Apps to run macros on a locally stored desktop Excel file?
No, Power Apps operates in the cloud and cannot directly trigger local desktop VBA macros. You must migrate your logic to an Office Script and host the file on SharePoint or OneDrive to automate it via Power Automate.
Are Office Scripts the exact same thing as VBA?
No. Office Scripts are written in TypeScript (a modern superset of JavaScript) and run securely in the cloud across all platforms. VBA is an older, desktop-bound language. You will need to rewrite your macros to utilize Office Scripts.
Does WPS Office support running VBA macros on Android?
Similar to Microsoft Excel, WPS Office supports VBA exclusively on its desktop platforms (such as Windows). Mobile versions of the app do not execute VBA macros due to identical mobile operating system limitations.




