Hello Michael and welcome to the board.

Rather large chunk of code to digest in one sitting. If I get time I'll try to review it for you if no one else comes along to help you out.

I'm sure KiX can do the job.