Thanks for quick reply, but how do I use this. Do I attach the code to a button or is this a macro?