Summary
Box for Microsoft Desktop co-authoring is not recommended for authoring macro-enabled Excel workbooks (.xlsm). Users may be able to run existing VBA functions or macros while co-authoring, but editing macros or VBA code during an active co-authoring session can interrupt other users.
If Excel blocks macros when opening a co-authored workbook from Box, modify the macro security settings to allow macros for trusted workbooks.
Symptoms
- A user opens an Excel macro-enabled workbook (
.xlsm) through Box for Microsoft Desktop co-authoring and sees a macro security warning or macro-blocking behavior. - A macro configured to run automatically when the workbook opens (for e.g. via
Workbook_Openfunction) does not launch when the file is opened through Microsoft co-authoring.
Root Cause
Microsoft recommends that users edit macros or VBA code only while working alone. Changing a workbook's macros or VBA code while co-authoring can interrupt other users who have the same workbook open.
Existing macro execution may work in some cases, but macro-enabled workbook authoring is not recommended while co-authoring (see "Only edit macros or VBA code while working alone" section in this article).
Macros set to run automatically when an Excel workbook opens may not launch when event-driven macro behavior overlaps with co-authoring event handling, such as workbook open or save events. In these cases, Excel may not launch the macro automatically.
Separately, Microsoft Office may block macros for files opened from locations it does not trust. On Windows, when Box for Microsoft Desktop co-authoring opens content through Box URLs, Excel may treat that cloud location as untrusted unless the relevant Box domains are added to Trusted Sites. On macOS, Excel uses its own macro security preferences to determine whether to prompt for or block macros.
Resolution Steps
- Confirm whether the workbook is macro-enabled.
- Check whether the file extension is
.xlsm. - If the file is not macro-enabled, troubleshoot it as a general Excel co-authoring issue instead.
- Check whether the file extension is
-
If the issue is a macro security warning or blocked macro prompt, review the macro security settings for the user's operating system.
On Windows, add Box URLs to Trusted Sites:
- Press
Win + R. - Type
inetcpl.cpl, then selectOK. - Go to the
Securitytab. - Select
Trusted sites. - Select
Sites. - Add these URLs:
https://api.box.comhttps://www.box.com
- Select
Close, thenOK. - For more information, see Microsoft's guidance to Unblock all files from a specific network share or website.
On macOS, review Excel's macro security preference:
- Open Excel.
- From the menu bar, select
Excel>Preferences. - Select
Security. - Confirm that Excel is configured to prompt for macros, such as
Disable all macros with notification. - Open the workbook again and allow macros only if the workbook is trusted.
- For more information, see Microsoft's guidance to enable or disable macros in Microsoft 365 for Mac.
- Press
- Reopen the workbook through Box for Microsoft Desktop co-authoring and test the macro behavior again.
- If a macro should run automatically when the workbook opens but does not launch, open the Microsoft Excel application first, then open the workbook.
- If the automatic launch still does not occur, run the macro manually from Excel.
- If macros still fail during co-authoring, edit and run the macros outside the active co-authoring session.
- To do this, download the file to a local folder outside the Box Drive folder, then open it in Excel. Office opens the downloaded copy as a local file instead of opening it via WOPI through co-authoring.
- Edits made to the downloaded copy are not automatically synced back to Box. To keep the changes in Box, manually upload the edited file as a new version.