patouman
XLDnaute Occasionnel
Bonjour à tous,
ma macro ci dessous me pose un problème, celle ci me supprime les autorisations de modification sur les cellules une fois qu'elle a été exécutée
comment faire d'après vous pour que ces autorisations soient conservées ?
Merci
ActiveSheet.Unprotect Password:="1234"
Rows("9:9").Select
Selection.Copy
Range("A10").Select
Selection.Insert Shift:=xlDown
Application.CutCopyMode = False
Range("B10").Select
Selection.ClearContents
Range("C10").Select
Selection.ClearContents
Range("D10").Select
Selection.ClearContents
Range("E10").Select
Selection.ClearContents
Range("F10").Select
Selection.ClearContents
Range("G10").Select
Selection.ClearContents
Range("I10").Select
Selection.ClearContents
Range("K10").Select
Selection.ClearContents
Range("M10").Select
Selection.ClearContents
Range("O10").Select
Selection.ClearContents
Range("Q10").Select
Selection.ClearContents
Range("B8").Select
ActiveSheet.protect DrawingObjects:=True, Contents:=True, Scenarios:=True _
, AllowFormattingCells:=True, AllowDeletingRows:=True, AllowSorting:=True
ActiveSheet.protect Password:="1234"
End Sub
ma macro ci dessous me pose un problème, celle ci me supprime les autorisations de modification sur les cellules une fois qu'elle a été exécutée
comment faire d'après vous pour que ces autorisations soient conservées ?
Merci
ActiveSheet.Unprotect Password:="1234"
Rows("9:9").Select
Selection.Copy
Range("A10").Select
Selection.Insert Shift:=xlDown
Application.CutCopyMode = False
Range("B10").Select
Selection.ClearContents
Range("C10").Select
Selection.ClearContents
Range("D10").Select
Selection.ClearContents
Range("E10").Select
Selection.ClearContents
Range("F10").Select
Selection.ClearContents
Range("G10").Select
Selection.ClearContents
Range("I10").Select
Selection.ClearContents
Range("K10").Select
Selection.ClearContents
Range("M10").Select
Selection.ClearContents
Range("O10").Select
Selection.ClearContents
Range("Q10").Select
Selection.ClearContents
Range("B8").Select
ActiveSheet.protect DrawingObjects:=True, Contents:=True, Scenarios:=True _
, AllowFormattingCells:=True, AllowDeletingRows:=True, AllowSorting:=True
ActiveSheet.protect Password:="1234"
End Sub