You did include the UDF itself in your code right?

@ is a reserved character in kix so you may need to double up on it or use SetOption("NoMarcosInStrings", "On") at the top of your script.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.