Sub protéger()
protection True
End Sub
Sub déprotéger()
protection False
End Sub
Private Sub protection(VerrouFermé As Boolean)
Dim ws As Worksheet
MDP$ = InputBox("Saisir votre mot de passe!", "Identification")
For Each ws In Worksheets
Select Case VerrouFermé
Case True
ws.Protect MDP$
Case False
ws.Unprotect MDP$
End Select
Next
End Sub