Can't Raise Error twice

  • Thread starter Thread starter DzednConfsd
  • Start date Start date
D

DzednConfsd

What am I doing wrong? The second time the sub CallMe is called, I get
the VB Runtime error instead of the error passing back to the calling
procedure and being dealt with there.
Thanks for your help.
Sub test()
Dim x As Integer
On Error GoTo test_Error

NEXTACCOUNT:

For x = 1 To 10
callme
Next

Exit Sub
test_Error:
MsgBox "Error " & Err.Number & " (" & Err.Description & ") in
procedure test of Module Module1"
Err.Clear
GoTo NEXTACCOUNT
End Sub

Sub callme()
Err.Raise 2500, "callme", "Testing"
End Sub
 
Back
Top