Run VBA Macros in XLSM Files from OneDrive Using WPS Office
Question details
The user needs to use VBA macros in an XLSM workbook stored on OneDrive, but macros, multiple-selection dropdowns, and automatic row-height adjustments fail when the file opens in a browser.
- Product
- WPS Office Spreadsheets and Microsoft Excel XLSM workbooks
- Device & OS
- not provided
- Scenario
- A macro-enabled XLSM workbook is stored on OneDrive and needs VBA features, multiple-selection dropdowns, and automatic row-height updates to work when the file is opened.
- Observed behavior
- When the workbook opens in a browser, VBA features and ActiveX controls do not run; data-validation dropdowns support only one selection and automatic row-height adjustments do not work.
Download or sync the XLSM file to a local folder before opening it in a desktop spreadsheet application. Verify that the file comes from a trusted source before enabling macros or ActiveX content.
Open the XLSM File in WPS Office Desktop to Run VBA Macros
Use this when you need the macro-enabled workbook to work with VBA, dropdowns, and row-height updates; WPS Office Spreadsheets on Windows can open XLSM files in a desktop environment.
Excel for the web does not run VBA macros or ActiveX controls. Opening the same file in a desktop spreadsheet application is the supported way to run VBA code, and WPS Office Spreadsheets on Windows can open macro-enabled XLSM workbooks.
In OneDrive, select the XLSM workbook and choose Download, or sync the OneDrive folder to your Windows PC so the file is available locally.
Right-click the XLSM file, choose Open with > WPS Office Spreadsheets, or open WPS Office, click Menu > Open, and browse to the downloaded OneDrive file.
If WPS Office shows a security warning, confirm the file is from a trusted source and click Enable Macros or Enable Content to allow VBA to run.
Run the VBA macro from the Developer tab or macro dialog, and verify the dropdown selections and automatic row-height adjustments now work in the desktop file.

Use Microsoft Excel Desktop as an Alternative for This Workbook
Use this if your workflow is tied to Microsoft Excel; open the same XLSM file in Excel for Windows or Microsoft 365 desktop and enable macros after trusting the file.
Redesign the Workbook for Browser Compatibility
Use this when stakeholders must work in Excel for the web and VBA cannot be used.
Run XLSM VBA Macros from OneDrive with WPS Office Spreadsheets
Download WPS Office for Windows, open the OneDrive XLSM file directly in WPS Spreadsheets, and enable macros to run VBA code, use desktop dropdown behavior, and keep working in .xlsm format without paying for Microsoft Excel.
- 1. Download and install WPS Office for Windows: Go to the official WPS Office download page, download the free WPS Office installer, and install WPS Spreadsheets on your Windows PC.
- 2. Download or sync the XLSM file from OneDrive: Open OneDrive in a browser or use the OneDrive desktop app to download or sync the XLSM workbook to your computer.
- 3. Open the XLSM in WPS Spreadsheets and enable macros: Right-click the XLSM file and choose Open with WPS Office Spreadsheets; when the macro security prompt appears, click Enable Macros or Enable Content after verifying the file source.
- 4. Run and verify the VBA workflow: Open the macro dialog or Developer tab, run the VBA macro, and confirm dropdowns and row-height adjustments perform as expected.

Frequently Asked Questions
Why do VBA macros fail when I open an XLSM file from OneDrive in a browser?
Excel for the web does not run VBA macros or ActiveX controls. Download the XLSM file and open it in a desktop application such as WPS Office Spreadsheets or Excel desktop, then enable macros after verifying the file source.
Can WPS Office open and run macro-enabled XLSM files?
WPS Office Spreadsheets on Windows can open .xlsm workbooks and run VBA macros in the desktop application after you enable macro content and confirm the file is trusted.
Do multiple-selection data validation dropdowns work in Excel for the web?
No, standard data validation lists in Excel for the web support only one selection. For multiple selections, open the file in a desktop spreadsheet application or redesign the behavior with helper columns or Office Scripts.
How do I download an XLSM file from OneDrive?
Select the file in OneDrive and choose Download, or use the OneDrive desktop app to sync the folder to your computer, then open the XLSM file from the local folder.
Will WPS Office preserve my XLSM file format when saving?
WPS Spreadsheets supports .xlsm macro-enabled workbook files and can save in XLSM format. After saving, open the file and run the macro to confirm that your VBA content works as expected.




