Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error Handling in VBA
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00840116
Message ID:
00840122
Views:
31
Ok, I'll be more descriptive:
Option Explicit
Sub Main()
    On Error GoTo OnError
    Call function1
    Call function2
OnError:
    Debug.Print Err.Number
    Debug.Print Err.Description
    Call ErrorHandler
End Sub

Sub function1()
    Dim aa As Integer
    aa = 2 / 0
End Sub

Sub function2()
'
End Sub

Sub ErrorHandler()
    On Error GoTo 0
    MsgBox "Halabaloo!"
End Sub
Also take a look at On Error Resume Next option and this link
http://www.keysound.com/html/error_faq.htm
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform