Private Sub CommandButton1_Click()
If TextBox1 = "admin" And TextBox2 = "toto" Then
ActiveSheet.Unprotect
ActiveWorkbook.Unprotect
Sheets("menu").Select
Unload Me
MsgBox "Identification ok", vbInformation
Exit Sub
End If
If TextBox1 = "user" And TextBox2 = "toto" Then
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
ActiveWorkbook.Protect Structure:=True, Windows:=False
Sheets("feuil1").Select
Unload Me
MsgBox "Identification ok", vbInformation
Exit Sub
End If
MsgBox "Identifiant ou Mot de Passe Incorrectes", vbInformation
End Sub