How to Add Buttons to Excel to Run Scripts
Office Scripts add automation to Excel worksheets in OneDrive, SharePoint, and the desktop version. This feature adds a button to your Excel sheet and runs a series of steps when you click on it.
Instead of doing tasks manually, you can create an Excel online button to run a script to improve your workflow and productivity. If you share the workbook in Microsoft Teams, everyone accessing the sheet can use the script button, too.
Learn how to add an automation button to Excel with these steps.
1. Open your Excel Workbook
Open the spreadsheet you want to add an Office Script to. You can add automation to one Excel workbook at a time, so repeat these steps for all the sheets you want a button for. Then, click on the cell where you want the button to appear.
2. Navigate to the âAutomateâ Menu
Go to the âAutomateâ tab in Microsoft Excel. This menu has the options and settings for existing scripts and scripts you have previously created.
3. Choose the Script You Want to Run
The âAutomateâ tab shows a list of the most recent scripts used and an âAll Scriptsâ button for a list of the scripts. In the script list, select the option you want a button for. The âCode Editorâ window will display the script name and a description of what it does. Click âAll Scriptsâ to return to the list of options.
4. Select âMore optionsâ
Once you have chosen a script, see the âMore optionsâ menu (âŚ).
5. Add a Button of the script
Under the menu of further options, choose âAdd button.â An Office Script button with the default appearance settings will pop up in the selected cell.
6. Customize the Script Button
If you want to alter your button, right-click it to show the menu of editing options. You can choose a fill color, change the text from the script name, and more. Open the âShapeâ tab to change the button’s shape. To adjust its size or move the placement, click and drag the button as you would with a text box.
7. Run Your Office Script in Excel
Left-click on the button, and a âScript Run Statusâ window will appear to show the script’s progress. The script will be completed in just a few seconds, and the window will say, âThe [script name] script ran successfully.â
Learn More About Our Managed IT Services
Ready to offload your IT management? Agio offers IT-as-a-Service to host, monitor, and support your network. We understand your IT issues and provide the consistency, visibility, and scalability you need for high uptime and productivity. Contact us to learn more.
Share post
Featured Posts
Connect with us.
Need a solution? Want to partner with us? Please complete the fields below to connect with a member of our team.