Private Sub CommandButton1_Click()
Dim trouve As Boolean
Dim identif As Range
If TextBox1 = "" Then MsgBox " Champ OBLIGATOIRE !": Exit Sub
MsgBox "Votre Identifiant est: " & TextBox1
With Sheets("basededonné")
For Each identif In .Range(.[C2], .[C65536].End(xlUp))
If identif.Value = TextBox1.Value Then
trouve = True
Exit For
End If
Next identif
End With
If Not trouve Then
MsgBox "Login incorrect, veuillez recommencer."
Exit Sub
End If
Sheets("basededonné").Range("A65536").End(xlUp).Offset(1, 0).Value = TextBox1
Sheets("basededonné").Range("B65536").End(xlUp).Offset(1, 0).Value = Now
Sheets("basededonné").Select
Unload Me
Sheets("menu choix outils").Select
End Sub