Sub test()
Dim i As Integer
Dim sPass As String
Dim Protection As String
For i = 1 To 3
Protection = InputBox("Entrer votre mot de passe" & " " & i & " " & "essai sur 3")
If Protection = "1234" Then
MsgBox "mot de passe correct"
Call afficher_onglet_et_deprotection
Exit For
ElseIf i = 3 Then
MsgBox "mot de passe incorrect 3 éme essai et dernier "
Call cacher_onglet_et_protection
End If
Next i
End Sub