Option Explicit
Private Sub CheckBox1_Click()
If Form_Connexion.CheckBox1.Value = False Then
Form_Connexion.mdp.PasswordChar = "*"
Else
Form_Connexion.mdp.PasswordChar = Empty
End If
End Sub
Private Sub fermer_Click()
Unload Me
End Sub
Private Sub validation_Click()
Dim LOt As ListObject, Code As String, NUser As String, TTit(), TDon(), L As Long, C As Long
Code = mdp.Value
NUser = identifiant.Value
Set LOt = Worksheets("MEMBERS").ListObjects(1)
If Code = "" And NUser = "" Then
MsgBox "Veuillez entrer vos identifiants", vbExclamation
Exit Sub: End If
On Error Resume Next
L = WorksheetFunction.Match(NUser, LOt.ListColumns("Users").DataBodyRange, 0)
If Err Then
MsgBox "Utilisateur inexistant", vbExclamation
Exit Sub: End If
On Error GoTo 0
TTit = LOt.HeaderRowRange.Value
TDon = LOt.ListRows(L).Range.Value
If Code = TDon(1, 2) Then
For C = 6 To UBound(TTit, 2)
Worksheets(TTit(1, C)).Visible = IIf(IsEmpty(TDon(1, C)), xlSheetVeryHidden, xlSheetVisible)
Next C
Sheets("Sommaire").Activate
Else
MsgBox "Mot de passe incorrect", vbExclamation
End If
End Sub