>The function seems short and good
> However it does not work
> It returns "invalid argument"
>
> I am using VFP 6
> Is it only for VFP 7 or higher ?
For VFP6, you may have to use the FOXTOOLS.FLL.
SET LIBRARY TO x:\path2foxtools\foxtools.fll
and replace the GETWORDNUM() function with the WORDNUM() function.