tarnold,

Looking through your code..

You need to surround with quotes:

$s=\\ntmain

to be -

$s="\\ntmain"

Try that..

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's