Hi Damian,
Really depends on "how" you want to trap, because there are a couple of methods. 1st, you could use the built-in error trapping in each code segment. These are a link that have text like "When error generated by application". Click on this and you'll have several options on how to process errors generated in that segment.
2nd, you can test the "ErrorOccurred" event and act accordingly based on the type of error.
Cheers!
Ken