IT SOLUTIONS
Your full service technology partner! 
-Collapse +Expand
To/From Code
-Collapse +Expand Cross Ref Guide
-Collapse +Expand Members-Only
Sign in to see member-only pages.
   ► KBTo/From GuidesVB.Net  Print This     

Exception Trapping (VB.Net and Access VBA Cross Reference Guide)

By Mike Prestwood

VB.Net versus Access VBA: A side by side comparison between VB.Net and Access VBA.

 
Statements
 

Common statements such as if statements, loops, etc.

Exception Trapping

[Other Languages] 

Languages Focus

A common usage of exception handling is to obtain and use resources in a "try-it" block, deal with any exceptions in an "exceptions" block, and release the resources in some kind of "final" block which executes whether or not any exceptions are trapped.

VB.Net:   Try...Catch...Finally

VB.Net uses a try...catch...finally statement to trap for errors.

Try
Catch
Finally
End Try
Syntax Example:
Try
Dim y As Integer = 0
y = 1 / y
Catch
MessageBox.Show("you cannot divide by zero")

End Try
[Not specified yet. Coming...]












Sales Website: www.prestwood.com Or visit our legacy sales site: 
legacy.prestwood.com


©1995-2024 Prestwood IT Solutions.   [Security & Privacy]