To create a button in google sheet and link to another sheet
through the script, just follow the below steps.
First, open a google sheet, click on the main menu, Insert - Drawing
Select a Shape and desired Button and drag and create button
Now, once button created click on the three dots on the top right of the button
Now go to tool - script editor and delete existing codes. and paste the following code :
function PC() {
var selection =
SpreadsheetApp.getActiveSheet().getActiveCell().getValue();
var html = "<script>window.open(' paste url
here');google.script.host.close();</script>";
var userInterface = HtmlService.createHtmlOutput(html);
SpreadsheetApp.getUi().showModalDialog(userInterface, 'Petty
Cash');
}
I have tried this over and over again and it keeps going back to the button page and not the actual google sheet it is supposed to
ReplyDeleteyes..I also face the same problem
DeleteUncheck the pop-up blocker in your browser. It will work. search how to disable it. it depend on your browser app
Delete