Hi,
Am having a very strange problem:
The ErrorHandler does not get executed. There must be a mistake in the code but I'm not seeing it! Here is a pared down version of my code:
It just stops at the Error 3002 line and the Error Handler code doesn't get executed at all?
Am having a very strange problem:
The ErrorHandler does not get executed. There must be a mistake in the code but I'm not seeing it! Here is a pared down version of my code:
Code:
Public Function createAssignRecord(lstPart As ListBox)
On Error GoTo Err_createAssignRecord
Error 3022
Exit_createAssignRecord:
Exit Function
Err_createAssignRecord:
Select Case Err.Number
Case 3022 'ignore duplicate keys
MsgBox "You have already added this record"
Resume Next
Case Else
MsgBox Err.Number & "-" & Err.Description
Resume Exit_createAssignRecord
End Select
End Function
It just stops at the Error 3002 line and the Error Handler code doesn't get executed at all?