View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
RyanH RyanH is offline
external usenet poster
 
Posts: 586
Default Call Procedure with On Error Statement

Is there a way to call my error handler procedure when an error occurs in any
of my procedures. This is kinda what I was looking for.

Sub Test()

On Error GoTo ErrorHandler(Err.Number)
'my code here

End Sub

Sub ErrorHandler(ByVal intErrorNumber As Integer)

Select Case intErrorNumber
Case 1
'do this
'and so on

End Select

End Sub


--
Cheers,
Ryan