My original code returned 0 on error, plus exited the error code. This is a mutation of my original UDF. Maybe you should post the original and work from there?

Glenn
_________________________
Actually I am a Rocket Scientist! \:D