Thank you xld.
Your code actually works exacatly the way I want it.
I didn't notice that first because it gave an error.

[vba]End Select[/vba] must be [vba]End If[/vba]
It's my bad anyway.

Your help is appreciated.