View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
DzednConfsd[_2_] DzednConfsd[_2_] is offline
external usenet poster
 
Posts: 1
Default Can't Raise Error twice

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