bonjour
je suis coicé je ne trouve pas la solution pour acceder a un UserForm_modifier depuis UserForm_pcl
voici mon code
Private Sub CommandButton1_Click()
Me.TextBox1.Value = "PCL"
If Me.TextBox2.Value = "" Then Exit Sub
With Sheets("mot de passe").Range("A3")
'Seuls le MOT PASSE en A3 est autorisé pour cette action
Set C = .Find(Me.TextBox1.Value, LookIn:=xlValues, LookAt:=xlWhole)
If Not C Is Nothing Then
' Ici on reconnait le mot pass en A3 et on ouvre "UsurForm_modifier"
If C.Offset(0, 1).Value = Me.TextBox2.Value Then
Nom = Me.TextBox1
Unload UserForm_pcl
' Ici je doit mettre ce qui ce passe si le code est bon ; je veu ouvrir "UsurForm_modifier"
Else
MsgBox "Mot de pass erroné", vbOKOnly + vbCritical, "Réessayer"
With Me
.TextBox1 = "PCL"
.TextBox2 = ""
End With
End If
End With
End Sub
merci de votre aide.