Bonjour toutes et tous,
Ce post est très intéressant mais mes compétences en écriture et syntaxe macro font que je n'arrive pas à partir du code joint sous format d'image à l'écrire correctement sur un de mes classeurs pour tester.
Pourriez-vous m'aider à le corriger :
Private Sub workbookOpen ()
'Protéger toutes les feuilles à l'ouverture du classeur
'Utiliser le "passe-droit" UserInterFaceOnly: =True pour que les macro fonctionnent malgré la protection
Dim ws As Worksheet
For Each ws In Worksheets
ws.protect Password:="g", UserInterFaceOnly: =True, DrawingObjects: =True, Contents: =True, scenarios:=True
AllowFormattingCells:=True,AllowFormattingColumns:=True,
AllowFormattingRows:=True,AllowInsertingRows:=True,
AllowInsertingHyperlinks:=True,AllowDeletingRows:=True
Next Ws
End Sub