Bonjour,
Je souhaiterai ajouter des identifiants (type user1, user2) et des mots de passe à un userform d'identification mais je ne sais pas comment le coder ni ou le placer. Pourriez vous m'aider s'il vous plait. Voici le code ci dessous.
Merci :
Private Sub CommandButton2_Click()
'commandbutton2 est ok
If TextBox2 = "DAMOUR" And TextBox1 = "WGV908" Then
'Fermeture du formulaire.
Unload Me
Else
MsgBox "IDENTIFICATION INCORRECTE !!!", vbExclamation
End If
End Sub
Private Sub Label1_Click()
'label1 est login
End Sub
Private Sub Label2_Click()
'label2 est password
End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Call Macro1record
End Sub
Private Sub TextBox3_Change()
End Sub
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
'ne peut pas se fermer avec la croix
If CloseMode <> vbFormCode Then Cancel = True
'Cancel = True
End Sub
Private Sub CommandButton1_Click()
'commandbutton1 est annulé
ActiveWorkbook.Close
End Sub