Catch exception When
Using a When statement on an Exception Catch has been an invaluable tool for us. We have a Try Catch Block where we only want to catch a certain exception when some condition is true, so we added a When statement like this:
Catch argex As ArgumentOutOfRangeException When tblRecords.TableName <> "paccont"