Re : forcage majuscule
bonsoir,
je l'ai appliqué a cela :
Dim Rech, Réponse As Range
Dim MonParametre As Byte
Static TentativePW As Byte, TentativeID As Byte
Application.ScreenUpdating = False
If Txb_ID_Util = Empty Then End
'If Txb_ID_Util = "" Then Exit Sub
Range("Users") = UCase(Range("Users"))
Set Rech = Range("Users").Find(Txb_ID_Util, LookIn:=xlValues, lookat:=xlWhole)
If Not Rech Is Nothing Then
If Txb_Pwd_Util = Rech.Offset(0, 1) Then
MonParametre = Rech.Offset(0, 2)
MaMacro MonParametre 'ici passage de paramètres "Niveau"
Else
TentativePW = TentativePW + 1
If TentativePW > 3 Then MsgBox "ESSAYE ENCORE ", vbCritical, T: Exit Sub
'ThisWorkbook.Close 0
MsgBox "Mot de passe invalide, Tentative N° " & TentativePW & " Sur 3", vbCritical, T
With Me.Txb_Pwd_Util
.Value = ""
.SetFocus
End With
End If
Else
TentativeID = TentativeID + 1
If TentativeID > 3 Then MsgBox "BONJOUR ! " & Chr(13) & " " & Chr(13) & " JE PENSE QUE VOUS AVEZ UN SOUCI AVEC VOTRE IDENTIFIANT OU AVEC VOTRE MOT DE PASSE." & Chr(13) & " " & Chr(13) & "PREVENEZ L'ADMINISTRATEUR QUI SE FERA UN PLAISIR DE VOUS VENIR EN AIDE... MERCI ", vbExclamation, T: End 'ThisWorkbook.Close 0"
MsgBox "Utilisateur inconnu, , Tentative N° " & TentativeID & " Sur 3", vbCritical, T
With Me.Txb_ID_Util
.Value = ""
.SetFocus
.SelStart = 0
.SelLength = Len(Me.Txb_ID_Util.Text)
End With
End If
et ca ne fonctionne pas (incompatibilité de type). Users représente le critère de plusieurs mots de passe possible.