[COLOR="DarkSlateGray"][B][COLOR="Red"]Private n&[/COLOR]
Private Sub Suivant_Click()
On Error GoTo erreur [COLOR="SeaGreen"]'<==Ajout pour envoyer un message en cas d'erreur[/COLOR]
If Not Me.TextBox1.Value = "" Then
[COLOR="Red"]v = Evaluate("=SUMPRODUCT(1*ISNUMBER(SEARCH(" & TextBox1.Value & ",$A$1:$E$2000)))")
TextBox7.Value = n Mod v + 1 & " / " & v
n = n + 1[/COLOR]
Cells.Find(What:=TextBox1.Value, After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=False).Activate
Range("A" & ActiveCell.Row).Select
TextBox2.Value = ActiveCell
Range("B" & ActiveCell.Row).Select
TextBox6.Value = ActiveCell
Range("C" & ActiveCell.Row).Select
TextBox3.Value = ActiveCell
Range("D" & ActiveCell.Row).Select
TextBox4.Value = ActiveCell
Range("E" & ActiveCell.Row).Select
TextBox5.Value = ActiveCell
End If
Exit Sub [COLOR="SeaGreen"]'<=== ajouter pour sortir si pas d'erreur[/COLOR]
'
erreur: [COLOR="SeaGreen"]'<=== ajout pour message d'erreur[/COLOR]
MsgBox "Le terme recherché n'existe pas"
End Sub
Private Sub Quitter_Click()
[COLOR="Red"]n = 0[/COLOR]
Unload UserForm1
End Sub
Private Sub Effacer_click()
[COLOR="Red"]n = 0[/COLOR]
TextBox1.Value = ""
TextBox2.Value = ""
TextBox3.Value = ""
TextBox4.Value = ""
TextBox5.Value = ""
TextBox6.Value = ""
TextBox7.Value = ""
TextBox1.SetFocus
End Sub[/B][/COLOR]