I would like to know if there's a way to automatically trigger a script every time a specific sheet, inside a worksheet, is selected.
Looking around I found the onSelectionChange function but I have not been able to use it for my scope. Script draft below.
function onSelectionChange(e)
{ // Run update script when sheet is selected
var sheet = e.sheet;
var ssname = SpreadsheetApp.getActiveSheet().getName();
if(ssname === "Projects") {
UpdateProjects();
}
}
Any suggestion would be much appreciated. Thanks!