Propriedade Protection.AllowInsertingRows (Excel)

Retorna True se a inserção de linhas for permitida em uma planilha protegida. Boolean somente leitura.

Sintaxe

expressão. AllowInsertingRows

Expressão Uma variável que representa um objeto Protection .

Comentários

A propriedade AllowInsertingRows pode ser definida usando os argumentos do método Protect .

Exemplo

Este exemplo permite ao usuário inserir linhas na planilha protegida e notifica o usuário.

Sub ProtectionOptions() 
 
 ActiveSheet.Unprotect 
 
 ' Allow rows to be inserted on a protected worksheet. 
 If ActiveSheet.Protection.AllowInsertingRows = False Then 
 ActiveSheet.Protect AllowInsertingRows:=True 
 End If 
 
 MsgBox "Rows can be inserted on this protected worksheet." 
 
End Sub

Suporte e comentários

Tem dúvidas ou quer enviar comentários sobre o VBA para Office ou sobre esta documentação? Confira Suporte e comentários sobre o VBA para Office a fim de obter orientação sobre as maneiras pelas quais você pode receber suporte e fornecer comentários.