Forum Discussion
Share a script
HelloJimCarr,
This is not related to your script or Copilot version. The error occurs because Excel cannot complete the share step, and a script must be shared before it can be added as a button.
In Microsoft Excel Office Scripts, adding a button requires the script to be associated with the workbook (shared). If that step fails, you will see this error.
Check the following:
Make sure the workbook is stored in OneDrive or SharePoint. Buttons do not work with local files
Confirm the script is saved and owned by you
From the Automate tab, open the script and enable “Associate with workbook”, then add the button
If it still fails, this is usually due to tenant policy restrictions or a temporary service issue, not the script
Docs:
https://support.microsoft.com/office/sharing-office-scripts-in-excel-226eddbc-3a44-4540-acfe-fccda3d1122b