Share an Excel XLSM Workbook Without Losing Macros and Slicers
Question details
The user needs to share a macro-enabled Excel workbook stored on OneDrive while retaining its VBA macros, slicers, PivotTables, and data validation.

- Product
- Microsoft Excel and OneDrive
- Device & OS
- not provided
- Scenario
- Share an XLSM workbook with other users who need access to its desktop Excel features.
- Observed behavior
- Recipients need to use the workbook's macros and advanced features, rather than only view or edit it in a browser.
Confirm that the workbook is saved as .xlsm and that recipients have a supported desktop version of Excel with permission to access the file. Check whether the VBA code depends on add-ins, local files, or other components that recipients also need.
Share the workbook through OneDrive and open it in desktop Excel
Use this method when recipients should work with the shared cloud file while using its macros and advanced Excel features.
OneDrive and SharePoint can store and share an XLSM workbook, but Excel for the web cannot run VBA macros. Opening the shared file in desktop Excel allows recipients to use features supported by their Excel version and environment.
In desktop Excel, open File > Save As and confirm that the file type is Excel Macro-Enabled Workbook (*.xlsm). Keep this format when saving changes.
In OneDrive or the SharePoint document library, select the workbook and click Share. Choose the recipients and grant editing permission if they need to modify the workbook, then send the invitation or link.
Ask each recipient to open the shared link and select Open in Desktop App or Open in app from the workbook's opening options. The wording and location can vary by interface.
In desktop Excel, follow any security prompts only if the workbook and its source are trusted. Test the macro buttons, slicers, PivotTable refresh, and data-validation lists before starting shared work.

Download the XLSM workbook and use a local desktop copy
Use this method when opening the shared file directly in desktop Excel is unavailable or recipients need an independent copy.
Use WPS Office for Everyday Spreadsheet Work Alongside Excel
WPS Office is a free, lightweight alternative with a familiar spreadsheet interface and Microsoft Office format compatibility for an easy transition to everyday editing. Keep using a supported desktop version of Microsoft Excel for this VBA-dependent workbook; WPS is not a guaranteed substitute for its macros, slicers, and other advanced features.

Frequently Asked Questions
Can recipients run VBA macros in Excel for the web?
No. Excel for the web can open macro-enabled workbooks, but it cannot run VBA macros. Recipients should use Open in Desktop App or download the .xlsm file and open it in a supported desktop version of Excel.
Will opening an XLSM workbook in a browser delete its macros?
Opening it in Excel for the web does not by itself mean the VBA project is deleted. However, VBA cannot run there, and advanced features may have browser limitations. Use desktop Excel for the full workflow and keep the file in .xlsm format.
Can several people edit a shared XLSM workbook at the same time?
Co-authoring can be available for .xlsm files stored on OneDrive or SharePoint when participants use supported Excel versions and the workbook meets co-authoring requirements. Browser participants still cannot run VBA. Avoid editing VBA code while others are co-authoring, and test macros that modify shared data before relying on simultaneous use.
Why do macros still fail after I download the workbook?
Excel may block macros because of the file's origin or your organization's security policy. The code may also require unavailable add-ins, local paths, or platform-specific components. Open the file in desktop Excel, review the security message, and contact your administrator if trusted macros are blocked.
Should I save the shared workbook as XLSX?
No, not if you need to retain VBA. The .xlsx format cannot store VBA macros. In desktop Excel, use File > Save As and select Excel Macro-Enabled Workbook (*.xlsm).




