Every error in VB is assigned a unique number which defines the type of error. We can check for that error number to find the type of error occurred in the application. This example shows how to trap IO and Ari thematic errors.