Permission & Access Issues

How to Resolve Office Scripts Sharing and Permission Issues in Excel

John WilsonJohn Wilson Nov 11, 2026 870 views

Question details

Users are experiencing errors where an Office Script runs initially in a shared workbook but later reports that the script has been unshared or is inaccessible.

Resolve Office Scripts Sharing and Permission Problems in Excel
Product
Microsoft Excel
Device & OS
not provided
Scenario
Collaborating on shared Excel workbooks and attempting to run or distribute Office Scripts among team members.
Observed behavior
The Office Script executes successfully once for shared users but subsequently throws an error stating it has been unshared, preventing further execution.
Before you start

Ensure that your shared workbook is saved in SharePoint or OneDrive, as Office Scripts require cloud storage to function collaboratively. Verify that all users have an eligible Microsoft 365 license with Office Scripts enabled.

Solution 1Recommended

Embed the Script in the Workbook Using a Button

Adding the script to the workbook via a button ensures that anyone with access to the workbook can run the script without encountering individual file sharing errors.

By default, Office Scripts are stored separately in the creator's personal OneDrive rather than embedded in the workbook like traditional VBA macros. Adding a button creates a direct link within the file, automatically granting run permissions to anyone who can edit the workbook.

1
Open the Automate tab

Open the shared workbook in Excel (web or desktop) and navigate to the 'Automate' tab on the main ribbon.

2
Access the Code Editor

Click on 'Code Editor' to view the list of your available scripts.

3
Select the target script

Click on the specific script you want to share with your collaborators.

4
Add the button to the worksheet

Click on 'More options' (the three dots icon) in the script pane and select 'Add button'. A clickable button will appear on the grid, allowing any user with edit access to run the script.

Embed the Script in the Workbook Using a Button
Script Availability: Once the button is added, the script is shared with the workbook. Users will not need to request separate permissions to execute it.
Free Microsoft Office alternative

Use WPS Office for Reliable Macro and Automation Support

If you are struggling with complex cloud-sharing permissions and script ownership issues in Excel, consider WPS Office. WPS Office provides robust support for traditional VBA macros and its own JavaScript macros, offering a seamless and lightweight alternative for automating spreadsheet tasks without complex OneDrive permission hurdles.

  1. 1. Download WPS Office: Visit the official WPS Office website and download the free desktop application.
  2. 2. Open your spreadsheet: Launch WPS Spreadsheet and open your existing Excel workbooks seamlessly.
  3. 3. Use Macro tools: Navigate to the 'Tools' tab to access Macro features and automate your workflows without cloud-sharing conflicts.
Free and lightweight office suite with a highly familiar user interfaceExcellent compatibility with Microsoft Excel (.xlsx, .xlsm, .xls) formatsSupports powerful VBA and JS macros for robust spreadsheet automationNo complex cloud permission setups required for basic macro sharing
microsoft office alternative - wps office

Frequently Asked Questions

Why does my Office Script say it has been unshared?

This usually happens because Office Scripts are stored in the original creator's personal OneDrive by default, not inside the workbook. If the owner's sharing link expires, or if they move or delete the file in their OneDrive, the script becomes inaccessible to collaborators.

How do Office Scripts differ from VBA macros in terms of sharing?

VBA macros are embedded directly inside the workbook file (e.g., .xlsm). When you share the file, the macros go with it. Office Scripts are saved as separate files in your cloud storage and must be explicitly shared or attached to a workbook via a button to be used collaboratively.

Can I run Office Scripts offline in Excel?

No. Office Scripts require an active internet connection and must be saved in OneDrive for Business or SharePoint to run or be shared with other users.