04-15-2011, 10:48 AM
See below example, hope this will help you to call error handling code in case of any error, make sure that error handler should be in the file where you called on error goto statement:
Code:
Public Sub InitializeMatrix(ByVal Var1 As Object, ByVal Var2 As Object)
On Error GoTo ErrorHandler
' Insert code that might generate an error here
Exit Sub
ErrorHandler:
' Insert code to handle the error here
Resume Next
End Sub