AJOUT d'option dans un code

Bonsoir EXCEL PRATIQUE

Bonsoir tout le mone

SVP je sollicite vos aides pour finir mon fichier

Se sera un grand bienfait de me donner un coup de main final dans ce code

J'ai poste hier un sujet voici son lien :

https://forum.excel-pratique.com/excel/nombre-de-tentatives-restantes-t75910.html

Le code fonctionne tres tres bien .. mais malheureusement j'ai oublie quelque chose tres necessaire ..

Option Explicit
Dim m_lNofTries As Long
Dim SERIAL As String
Dim X As New ABIDINE.XP10

Private Sub CommandButton1_Click()
SERIAL = TextBox1.Text + TextBox2.Text + TextBox3.Text
Me.Caption = SERIAL
If UCase(SERIAL) = UCase(X.MD5(Trim$(TextBox4.Text))) Then
MsgBox "BienVenue dans notre programme,", vbOKOnly
UserForm2.Show
Else
m_lNofTries = m_lNofTries + 1

If m_lNofTries <3 Then
msgbox "mot de passe erroné,  reste(nt)  " & 3- m_lNofTries & " essai(s)"
elseIf m_lNofTries = 3 Then
MsgBox "3 fausses tentatives ..AU REVOIR", vbCritical
Unload Me
End If
End If
End Sub

Je veux bien si vous pouvez m'aider bien sue ajouter cet option ..

L'utilisateur accede au fichier avec mot de passe correcte a la premiere fois simplement

Merci beaucoup d'avance pour l'aide

Cordialement

ABIDINE

Bonjour ABIDINE, le forum,

A tester

Option Explicit

Dim SERIAL As String

Dim X As New ABIDINE.XP10

Private Sub CommandButton1_Click()

SERIAL = TextBox1.Text + TextBox2.Text + TextBox3.Text

Me.Caption = SERIAL

If UCase(SERIAL) = UCase(X.MD5(Trim$(TextBox4.Text))) Then

MsgBox "BienVenue dans notre programme,", vbOKOnly

UserForm2.Show

Else

Msgbox "Mot de passe erroné."

Unload Me

End If

End Sub

Cordialement,

André

Rechercher des sujets similaires à "ajout option code"