Bonjour Forum
Bonjour tout le monde
SVP chers membres si vous pouvez m'aider a completer ce code ..
J'aime bien avoir si vous pouvez m'aider .. ajouter le nombre de tentatives restantes
Apres la premiere fausse tentative alors un MsgBox ou une troisieme UserForm qui m'indique le nombre restante
Avec ce code .. apres trois fausses tentatives on quitte l'application sans indication de nombre restant :
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 "3 fausses tentatives ..AU REVOIR", vbCritical
Unload Me
End If
End If
End Sub
Merci beaucoup d'avance pour l'aide
Tres cordialement
ABIDINE