Private Function mon_password()
mon_password = 'tonpassword'
End Function
Private Sub ActiveProtection()
ActiveSheet.Protect mon_password, DrawingObjects:=True, Contents:=True, _
Scenarios:=True
End Sub
Private Sub DesactiveProtection()
ActiveSheet.Unprotect mon_password
End Sub