Maybe:
Option Explicit
Private Sub CmdEnter_Click()
Dim NumFND As Range
On Error Resume Next
Set NumFND = Worksheets("Test").Range("B:B").Find(TxtQ.Text, LookIn:=xlValues, LookAt:=xlWhole)
If NumFND Is Nothing Then
LblResult.Caption = "0 OUT OF 90"
TxtCode.Value = ""
TxtPrice.Value = ""
TxtDescription.Value = ""
Else
LblResult.Caption = NumFND.Row - 5 & " OUT OF 90"
TxtCode.Value = Worksheets("Test").Range("C" & NumFND.Row).Value
TxtPrice.Value = Worksheets("Test").Range("D" & NumFND.Row).Value
TxtDescription.Value = Worksheets("Test").Range("F" & NumFND.Row).Value
End If
TxtQ.Value = ""
TxtQ.SetFocus
End Sub
Bookmarks