Dmitron 1036 thanks for the new code. I'm trying to adapt it to my needs and below is where the problems start. I'm totally new to this so please be gentle