Hi!
I have a problem with my VBA code: When I use the "On Error GoTo..." and an error occurs, the VBA still stops and tells me about the error, and does not allow the code to proceed.
Here is the code:
The code stops because the lookup-value does not exists in the lookup area, but this is something I just want it to ignore and keep on from "errhandler". I might have misunderstood something with the errhandler part - hope you can enlighten me.
Thanks,
N00bTube
I have a problem with my VBA code: When I use the "On Error GoTo..." and an error occurs, the VBA still stops and tells me about the error, and does not allow the code to proceed.
Here is the code:
Code:
On Error GoTo errhandler
Cells(15 + i, issuecodekol) = WorksheetFunction.VLookup(Cells(15 + i, 2).Value, Sheets("EM_S.06.02_help").Range("A1:O1000"), 3, False)
Cells(15 + i, issuegroupcodekol).Formula = WorksheetFunction.VLookup(Cells(15 + i, 2).Value, Sheets("EM_S.06.02_help").Range("A1:O1000"), 4, False)
Cells(15 + i, custodiankol).Formula = WorksheetFunction.VLookup(Cells(15 + i, 2).Value, Sheets("EM_S.06.02_help").Range("A1:O1000"), 5, False)
errhandler:
The code stops because the lookup-value does not exists in the lookup area, but this is something I just want it to ignore and keep on from "errhandler". I might have misunderstood something with the errhandler part - hope you can enlighten me.
Thanks,
N00bTube