logo
search
VBA & Macro Problems

Fix: Cannot Add Office Script Button to Excel Workbook

Maira MehtabMaira Mehtab Oct 9, 2026 870 views

Question details

The user is unable to add an Office Script button to their Excel workbook, despite the script running successfully in the editor.

Fix: Cannot Add Office Script Button to Excel Workbook
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.
Before you start

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.

Solution 1Recommended

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.

1
Open Automate Tab

Open Excel on the web or desktop and navigate to the 'Automate' tab on the top ribbon.

2
Open Code Editor

Select the specific script you are trying to add to open the Code Editor pane.

3
Verify Script Access

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.

4
Retry Adding Button

Once sharing is enabled and permissions are verified, click the 'Add button' option again.

Check Script Permissions and Sharing Settings
Free Microsoft Office alternative

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. 1. Download and Install: Download WPS Office from the official website and complete the quick installation.
  2. 2. Open Your Workbook: Open your macro-enabled spreadsheet directly in WPS Spreadsheet.
  3. 3. Enable Macros: Click 'Enable Macros' if prompted, and use standard VBA form buttons seamlessly.
Fully compatible with Microsoft Excel (.xlsx, .xls) and macro-enabled (.xlsm) formats.Robust offline support for traditional VBA macros without requiring complex tenant-level cloud configurations.Lightweight design that installs quickly and runs smoothly on older devices.Familiar ribbon interface ensures a zero learning curve for Excel users.
microsoft office alternative - wps office

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.