How can I trap this Vlookup error in a VBA macro
Hi Richard,
In another thread some time ago i found that VLookup() produces a
runtime error when the value can not be found. You can use the
following to snap that event.
Code:
On Error Resume Next
'VLookUp()
If Err.Number < 0 Then
'If not found
Debug.Print Err.Number
Debug.Print Err.Description
Else
' If found
End If
On Error Goto ErorrHndl
Regards,
Bondi
|