Creating a clickable button
In the previous chapter, you learned how to open the script editor in Google Sheets. For this task, open the script editor in a newly created or any existing Google Sheet and follow these steps:
- Select cell B3 or any other cell. Click on Insert and select Drawing..., as shown in the following screenshot:
- A drawing editor window will open. Click on the Text box icon and then click anywhere within the canvas area. Type
Click Me
. Resize the object to enclose the text only, as shown in the following screenshot: - Click on Save & Close to exit the drawing editor. Now, the Click Me image will be inserted into the active cell (B3), as shown in the following screenshot:
You can drag this image anywhere around the spreadsheet except in the menu bar.
Tip
In Google Sheets, images are not anchored to a particular cell, and they can be dragged or moved around.
If you click on the image, a drop-down arrow on the top-right corner will be visible:
- Click on the Assign script…...