'Minha Macro é Esta em uma folha
Private Sub Worksheet_Change(ByVal Target As Range)
Dim rng As Range
ActiveSheet.Unprotect Password:="senha"
Cells.Locked = False
On Error Resume Next
Set rng = Cells.SpecialCells(XlCellTypeText)
Set rng = Cells.SpecialCells(xlCellTypeFormulas)
If Err.Number > 0 Then
Set rng = Cells.SpecialCells(xlCellTypeConstants)
Set rng = Union(rng, Cells.SpecialCells(XlCellTypeText))
Set rng = Union(rng, Cells.SpecialCells(xlCellTypeFormulas))
Else
End If
On Error GoTo 0
If Not rng Is Nothing Then rng.Locked = True
ActiveSheet.Protect Password:="senha"
ActiveWorkbook.Save
End Sub
Depois em um modulo
Sub Apagar()
'Call Macro 'para contar 3 linhas de baixo para cima
'AQUI UM PROCEDIMENTO QUE CONTE 3 LINHAS PREENCHIDAS , DEBAIXO PARA CIMA PARA REALIZAR O CLEARCONTENTS
ActiveSheet.Unprotect Password:="senha"
MsgBox "A CÉLULA QUE VOCÊ SELECIONOU SERÁ APAGADA!!!"
ActiveCell.FormulaR1C1 = ClearContents
ActiveSheet.Protect Password:="senha"
End Sub
'presciso de inserir um procedimento que conte tres linhas debaixo para cima da coluna A ate coluna N Para realizar o clearContents
'Agradeço pela Ajuda