Private Sub cmd_rechercher_Click()
' la propriété de "defaut" est forcée à true (touche entrée)
End Sub
Option Explicit
Private Sub cmdRechercher_Click()
Dim cellule
Dim flag
Sheets("etat").Select
For Each cellule In Range("B7:B" & Range("B65535").End(xlUp).Row)
If cellule = txtN°lot.Value * 1 Then
flag = 1
Exit For
End If
Next cellule
If flag = 1 Then
MsgBox ("Résultat trouvé ! en cellule " & cellule.Address)
Range(cellule.Address).Select
Unload Me
Else
MsgBox ("Aucun résultat trouvé !")
End If
End Sub