A
A
Arabar2021-05-11 23:02:31
Google Apps Script
Arabar, 2021-05-11 23:02:31

How to fix "This area is protected" error?

All the best!

Recently, a disaster happened in a table that uses macros: one macro almost fell off and does not want to work adequately.

By dancing with a tambourine at the monitor, I found out the essence:
1. With a high probability, the code crashes on line 47 (yes, it is indicated in the error, but even without this line the code does not want to work, it gives this error without specifying the place of operation)
kalk.getRange("G14").setValue("Готово\n");

Exception: This area is protected. To change it, contact the table owner.
at rashet(Calculation:47:34)

2. If you give the user full access to the sheet - the code works. If it is limited - the code falls.
Yes, you can say "Look for a cell that is closed to the user, and at the same time is in the code", but there are none (I checked).

For tests, I made a version of the table, in which only the functionality that does not work is left (checked - the error repeats).
Copy to yourself, all settings are saved.
Link
https://docs.google.com/spreadsheets/d/1rjxMa48lFW...

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question