>>It's a fairly complex procedure that could really use some sub-programs. The entire code is about 200 lines long and logically can be broken into about 4 different sub-programs.
I'd probably create a class for that, as that would help with maintaining the code.
Claudio Lassala