Private Sub Workbook_BeforeClose(Cancel As Boolean)
Sheets("Feuil1").Protect Password:="1111"
Sheets("Feuil2").Protect Password:="2222"
Sheets("Feuil3").Protect Password:="3333"
' Sheets("xxxx").Protect Password:="aaaa"
ActiveWorkbook.Save
End Sub
Merci beaucoup !Bonjour Titipro,
On peut mettre ça dans Thisworkbook :
VB:Private Sub Workbook_BeforeClose(Cancel As Boolean) Sheets("Feuil1").Protect Password:="1111" Sheets("Feuil2").Protect Password:="2222" Sheets("Feuil3").Protect Password:="3333" ' Sheets("xxxx").Protect Password:="aaaa" ActiveWorkbook.Save End Sub