Fix Office Script Button Keeps Loading in Excel
Question details
The user needs a solution for an Office Script that runs perfectly in the code editor but gets stuck loading when launched from an Excel form control button.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Triggering an Office Script (which selects a specific cell range) using a button within an Excel workbook.
- Observed behavior
- When the button is clicked, the Script Run Status pane opens but remains stuck in an endless loading state, failing to complete the execution.
Ensure you have a stable internet connection, as Office Scripts rely on cloud services to execute, and verify that your Excel client is fully updated.
Seek Support in the Microsoft Q&A Office Scripts Community
Since Office Scripts is a specific Microsoft 365 cloud feature, technical UI glitches like a hanging Script Run Status pane are best investigated by Microsoft engineers.
Office Scripts operate differently from local VBA macros. Issues involving the Script Run Status pane failing to sync with button clicks often require back-end investigation by developers.
Navigate to the official Microsoft Q&A website and locate the dedicated Office Scripts channel.
Select the 'Ask a question' button to initiate a new support thread.
Clearly explain that your script works in the Code Editor but hangs in the Script Run Status pane when triggered by a button. Include your script's code for context.

Delete and Recreate the Script Button
Re-establishing the connection between the script and the form button can sometimes resolve localized interface glitches.
Try WPS Office for Reliable Offline Macro Execution
If you are frustrated by cloud-based script loading errors in Microsoft Excel, consider WPS Office. It provides a lightweight, locally executed macro environment supporting both VBA and JS macros, ensuring your automated tasks run smoothly without relying on cloud servers.
- 1. Download and Install: Get the free version of WPS Office from the official website and install it on your device.
- 2. Open Your Spreadsheet: Launch WPS Spreadsheet and open your existing Excel workbook.
- 3. Automate Locally: Use the built-in VBA or JS Macro editor under the Tools tab to reliably automate your workflows offline.

Frequently Asked Questions
Why does my Office Script button keep loading indefinitely?
This usually happens due to a synchronization issue between the local Excel user interface and Microsoft's cloud services, or because the form control button has become corrupted.
Can I use a VBA macro to fix an Office Script loading issue?
No. While VBA can perform similar tasks (like selecting cells), it operates on a completely different local engine. Using VBA is a workaround for the task, but it will not resolve issues specifically tied to the Office Script Run Status pane.
How do I test if my Office Script is actually working?
Navigate to the Automate tab in Excel, open the script in the Code Editor, and click the Run button directly. If it completes successfully, the script logic is correct, indicating the problem lies specifically with the button integration or the Status pane UI.




