You also perform a lot of file "Open's and numerous WriteLine's without any error checking. It may be easier to a UDF similar to WriteLog2() to handle all the OPEN's with error checking and filehandle management.
_________________________
Home page: http://www.kixhelp.com/hb/