thanks for your reply. I've copied your code into a new module but nothing seems to happen. Any ideas as to what i should do?

thanks

tom