Apologies, I have edited it. I had to re-read the 'how to get the best out of the forum' post to remind myself of this. I have not posted code for a long while and forgot.
I will link it for others who may stumble across here, or me for future reference...