P
pias
Guest
Bonsoir, le Forum
Le code ci-dessus s'exécute dans u' userForm, si la codition est vrais je cherche a obtenir deux choses.
1) Au lieu d'appeler un UserForm (UserForm1.Show), j'aimerais appeler un Macro( Macro1)
2)Et comment fermer l'userForm ? car avec le code actuel, si la codition est vrais elle reste active.
Merci d'avance pour les infos.
a+
@pias
--------------------------------------------------------------------------------
Private Sub Ok_Btn_Click()
If ID_Util = Empty Then End
Set Rech = Range("Users").Find(ID_Util, LookIn:=xlValues)
If Not Rech Is Nothing Then
If Pwd_Util = Rech.Cells(1, 2) Then
Range("Niveau_en_cours") = Rech.Cells(1, 3)
UserForm1.Show
Else
MsgBox ("Mot de passe invalide")
End If
Else
MsgBox ("Utilisateur inconnu")
End If
End Sub
Le code ci-dessus s'exécute dans u' userForm, si la codition est vrais je cherche a obtenir deux choses.
1) Au lieu d'appeler un UserForm (UserForm1.Show), j'aimerais appeler un Macro( Macro1)
2)Et comment fermer l'userForm ? car avec le code actuel, si la codition est vrais elle reste active.
Merci d'avance pour les infos.
a+
@pias
--------------------------------------------------------------------------------
Private Sub Ok_Btn_Click()
If ID_Util = Empty Then End
Set Rech = Range("Users").Find(ID_Util, LookIn:=xlValues)
If Not Rech Is Nothing Then
If Pwd_Util = Rech.Cells(1, 2) Then
Range("Niveau_en_cours") = Rech.Cells(1, 3)
UserForm1.Show
Else
MsgBox ("Mot de passe invalide")
End If
Else
MsgBox ("Utilisateur inconnu")
End If
End Sub