Create Script Event
Open App Scripts: Google Sheets -> Tools -> Script Editor
Create the following function.
function onClick() { SpreadsheetApp.getUi().alert('Hello');}
Add Image Button
Google Sheet -> Insert
Image
->Image over Cells
(Googleimage button generator
to generate an Image Button)Drawing
: Draw your own button
Click on the 3-vertical-dot
on the top-right corner of the imag/drawing, click Assign Script
and put in onClick
.
Test
Click on the button.
NOTE: To show the 3-vertical-dot
again, right click on the button.