Hi Ray,
Yes it works fine now. The IF statement must have been left there when i removed a function. I do have a habit of putting IF ELSE clauses for a function then fogetting to remove them when I remove that function, musy have missed that one. :-)
Thanks again for your prompt and effective help.
Dave