what he seems to want is persistence of the variable between calls to the UDF.
and global variable is pretty much only way of doing it.
_________________________
!

download KiXnet