Fix: Cannot Add Office Script Button to Excel Workbook
Question details
The user is unable to add an Office Script button to their Excel workbook, despite the script running successfully in the editor.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Attempting to create a clickable button in an Excel worksheet to run a custom Office Script.
- Observed behavior
- Selecting the 'Add button' option does nothing. The script is not added to the workbook, and no error message is displayed.
Ensure you have a stable internet connection and that your Microsoft 365 subscription includes the Office Scripts feature. Verify that standard VBA macros are still functioning properly to rule out general workbook corruption.
Check Script Permissions and Sharing Settings
Verify that you have the correct permissions and ownership of the script to add it to the workbook.
Office Scripts require explicit ownership or sharing configurations to interact with the workbook UI. If you are not the owner, or if the script is not shared properly, the button will not appear.
Open Excel on the web or desktop and navigate to the 'Automate' tab on the top ribbon.
Select the specific script you are trying to add to open the Code Editor pane.
Click the 'More options' (three dots) menu in the editor and check the 'Script access' settings. Ensure the script is shared with the workbook or that you have full owner permissions.
Once sharing is enabled and permissions are verified, click the 'Add button' option again.

Verify Organizational Policies with Your Admin
Microsoft 365 administrators can restrict Office Scripts functionality at the tenant level, preventing script UI elements from being added.
Test on Another Computer
Determine if the issue is device-specific or caused by local software conflicts.
Try WPS Office for Robust Macro and Spreadsheet Support
If you are dealing with complex organizational policies and script limitations in Microsoft 365, consider using WPS Office. WPS Spreadsheet offers excellent support for traditional VBA macros, a familiar user interface, and seamless compatibility with Microsoft Excel formats, all without complicated cloud-based admin restrictions.
- 1. Download and Install: Download WPS Office from the official website and complete the quick installation.
- 2. Open Your Workbook: Open your macro-enabled spreadsheet directly in WPS Spreadsheet.
- 3. Enable Macros: Click 'Enable Macros' if prompted, and use standard VBA form buttons seamlessly.

Frequently Asked Questions
Why is my Office Script button greyed out or not working?
This usually happens if you lack owner permissions for the script, if the script isn't correctly shared with the workbook, or if your organization's IT admin has disabled Office Scripts at the Microsoft 365 tenant level.
Can I use VBA macros instead of Office Scripts?
Yes, traditional VBA macros use Form Controls or ActiveX controls to create buttons. If Office Scripts are blocked by policies, VBA macros might still work depending on your local Excel Trust Center settings.
Do Office Script buttons work on the desktop version of Excel?
Yes, Office Script buttons work on both Excel on the web and modern versions of Excel for Windows and Mac, provided you have an eligible Microsoft 365 subscription and an active internet connection.




