Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
In Visual Basic, you can use a Try Catch block to catch exceptions. One common form of this statement has the following syntax:
Try
...codeToProtect...
Catch ex As ExceptionType1
...exceptionCode1...
Catch ex As ExceptionType2
...exceptionCode2...
Finally
...finallyCode...
End Try