I had posted the Q earlier:
and got an answer that was working perfect untill I came across this:
As said earlier, I put the event handler code in the main form's load event. In the form's load event there is another event handler that calls a sub whenever the binding manager's record changes. I am getting an error in this sub (before the form loads) and that error was unhandled, I was expecting the exception handler sub to take care of it. It didn't. I then tried adding a module, putting a sub main and the exception event handler code in it and calling this module at the start of the application (as suggested in the original Q). It still ends up with the unhandled exception.
I would like to know what modification is needed there?