How to call a function onChange?

I want to make a function is triggered when the formula(!) changes the value in the cell. How to use it correctly? The code below writes an error: you do not Have permission to call function newTrigger at [unknown function](Code:8)
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getActiveSheet();


myonChange function() {
June 10th 19 at 16:13
1 answer
June 10th 19 at 16:15
You are trying to create a trigger for the sheet, and the need for the spreadsheet.
did not help - orion86 commented on June 10th 19 at 16:18
What exactly is the error? The trigger is created? - Glenna29 commented on June 10th 19 at 16:21
, soran, my bad. Yes, it works, thank you) - orion86 commented on June 10th 19 at 16:24

Find more questions by tags Google Apps Script