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.