A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data
Hi Anonymous,
Since the script runs correctly from the Automate tab, the script itself looks healthy. The problem appears to sit with the button object and its link back to the script inside the workbook. The two things that temporarily bring it back, opening in desktop and toggling sheet protection, are useful clues, so a few details would help narrow this down:
- Does the button lose its function for everyone, or only for certain users?
- Does it break after a specific action, such as someone opening the workbook in the Excel desktop app, or after the sheet is protected?
- Is the button placed on a protected sheet, and is the shape itself locked?
- Is the workbook stored in OneDrive or SharePoint, and is anyone editing it in the desktop app at the same time?
- Does the script run under your account or a shared one, and is it stored in your own OneDrive or shared to the workbook?
While you gather that, it is worth testing a few things:
- Keep the workbook in the browser only for a few days and ask everyone to avoid the desktop app. Script buttons are a web feature, so a desktop editing session is the most likely candidate for breaking the link.
- Delete the broken button and add a fresh one from Automate, then note exactly what happens just before it goes inactive again.
- Test the same button on an unprotected copy of the sheet to see whether protection is involved.
- Try it in a different browser and in a private window to rule out a local caching problem.
If the button still fails with the workbook kept in the browser and protection off, that points to a product side defect. At that stage it is worth having your admin raise a support case so it can be logged and escalated, and you can also report it through Help > Feedback in Excel for the web. For guidance on opening a case, see Get support - Microsoft 365 admin. If you don't know who your IT administrator is, please refer to this article: How do I find my Microsoft 365 admin? - Microsoft Support
I hope this helps. Looking forward to your reply.
If the answer is helpful, please click "Yes" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in the forum documentation to enable e-mail notifications if you want to receive the related email notification for this thread.