If you use .WorksheetFunction.VLookup an Error result will cause debug, if on the other hand you opt for Application.VLookup the Error will not cause a debug per se, eg:
Range("F8").Value = Application.WorksheetFunction.IfError(Application.VLookup("*" & InputBox("What item code would you like to search?", "Item Code Search", "*") & "*", Range("I:I"), 1, False), "No Value")
(WorksheetFunctions are generally regarded as being slightly quicker to evaluate)
Note: the above will only work in XL2007 given IFERROR function does not exist in prior versions... the below is an alternative approach
Dim vAns As Variant
vAns = Application.VLookup("*" & InputBox("What item code would you like to search?", "Item Code Search", "*") & "*", Range("I:I"), 1, False)
Range("F8").Value = IIF(IsError(vAns),"No Value",vAns)
Bookmarks