Hello and Welcome to the board.

Please take the time to read some of the FAQs and look in the UDF forum for code to do as you ask.

I will move this post to the STARTERS forum as the SCRIPTS forum is for discussion of code.