Re,
la feuille Désamianté je n'avais pas vu de protection par contre l'onglet Cöef
à placer avant
ActiveSheet.Unprotect "" ' pour déprotéger la feuille active
à placer vers la fin de ma sub
ActiveSheet.Protect "" ' pour Protéger la feuille active
des exemples ici merci à Banzai64 https://forum.excel-pratique.com/viewtopic.php?t=33111
Exemple :
Sub aargh()
ActiveSheet.Unprotect ""
Selection.EntireRow.Insert xlDown, xlFormatFromLeftOrAbove
dl = Cells(Rows.Count, "C").End(xlUp).Row + 1
For col = 3 To 17
If Cells(12, col).HasFormula Then
Cells(13, col).AutoFill Destination:=Cells(13, col).Resize(dl - 13), Type:=xlFillDefault
End If
Next
ActiveSheet.Protect ""
End Sub
Sub aargh1()
ActiveSheet.Unprotect ""
Selection.EntireRow.Delete
dl = Cells(Rows.Count, "C").End(xlUp).Row + 1
For col = 3 To 17
If Cells(12, col).HasFormula Then
Cells(13, col).AutoFill Destination:=Cells(13, col).Resize(dl - 13), Type:=xlFillDefault
End If
Next
ActiveSheet.Protect ""
End Sub
crdlt,
André