i am not sure i understand your problem.
Private Sub txtEan_Exit(ByVal Cancel As MSForms.ReturnBoolean)
On Error Resume Next
If Len(txtEan.Text) >= 7 Then
form1 = WorksheetFunction.VLookup(Val(txtEan.Text), Worksheets("BD_Prod").Range("A1:D100000"), 2, 0)
form2 = WorksheetFunction.VLookup(Val(txtEan.Text), Worksheets("BD_Prod").Range("A1:D100000"), 3, 0)
form3 = WorksheetFunction.VLookup(Val(txtEan.Text), Worksheets("BD_Prod").Range("A1:D100000"), 4, 0)
If Err.Number = 0 Then
txtCod.Text = form1
txtDesc.Text = form2
txtVlrUnit.Text = form3
Else
MsgBox "Please enter correct EAN number", vbOKOnly, "EAN not found"
txtEan.SetFocus
txtEan.Text = ""
txtCod.Text = ""
txtDesc.Text = ""
txtVlrUnit.Text = ""
End If
Else
MsgBox "Please enter correct EAN number", vbOKOnly, "EAN not found"
txtEan.SetFocus
txtEan.Text = ""
txtCod.Text = ""
txtDesc.Text = ""
txtVlrUnit.Text = ""
End If
Me.txtEan.BackColor = RGB(255, 255, 255)
End Sub