Answer the question
In order to leave comments, you need to log in
How to correctly call the onChange function?
I want to make the function work when the formula (!) Changes the value in the cell. How to use it correctly? The code below throws an error: You do not have permission to call the function newTrigger at [unknown function](Code:8)
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getActiveSheet();
ScriptApp.newTrigger("myonChange")
.forSpreadsheet(sheet)
.onChange()
.create();
function myonChange() {
//код
}
Answer the question
In order to leave comments, you need to log in
You are trying to create a trigger for a sheet, but you want a spreadsheet.
Need
instead.forSpreadsheet(sheet)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question