Related topics
×
Sign in with Microsoft
Sign in or create an account.
Hello,
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.

An Office Script is a convenient way to automate common tasks. Help your colleagues find and run your Office Scripts by adding a script button to a workbook. This makes it easy for anyone in the workbook to run the script.

Create a script button

This procedure creates a button in the workbook that runs the script when the button is selected. It also shares the script with anyone who can edit the workbook. 

  1. Select Automate, and then select the script you want to run.

  2. If the script is not visible in the gallery, select All Scripts.

  3. In the Code Editor pane, under any tab, hover over a script name, and then select More options () > Add button.

Adding an Office Script Run button

Remove a script button 

This procedure removes all the buttons that run the script. 

  1. Select Automate, and then select the script you want to run.

  2. If the script is not visible in the gallery, select All Scripts.

  3. In the Code Editor pane, select More options (…) > Stop Sharing.

Note: If you delete script button, the script is removed, but only from that specific button. You can’t undo this delete operation and you can’t cut and paste the button elsewhere in the workbook. 

See Also

Introduction to Office Scripts in Excel

Sharing Office Scripts in Excel for the Web

Office Scripts technical documentation

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

Was this information helpful?

What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!

×