Sheet protection (macro)

How to protect a sheet in macro with the ability to insert rows?
The Protect method does not have the necessary arguments. Should I use the UNO method? Also without arguments.

Снимок экрана от 2022-02-10 13-24-59

And when I protect manually with the Insert/Delete rows checkboxes checked, then deleting rows does not work. When the sheet is protected, there is not even the “Delete rows” item in the context menu.

Realmente não funciona, testei em Win10+LibO7303 e também não mostra opção.

A alternativa é criar macro ligada a um Botão, exemplo, para Deletar a linha ativa, A MACRO desprotege, deleta e protege novamente.


It doesn’t really work, I tested it on Win10+LibO7303 and it doesn’t show any option either.

The alternative is to create macro linked to a Button, for example, to Delete the active line, MACRO unprotects, deletes and protects again.

The user removes the protection. When opening a file, the protection is set automatically, but without the option of inserting rows. The user has to remove the protection to insert rows, or unprotect and set it again, but with the option of inserting rows.

There is something superfluous here that interferes with work.

What I have proposed, is an alternative, until collaborators concert the problem.