Thank you for your input. Please help me what code can be added into code sniplet provided so that I can get rid of the error? How to open workbook and run the macro as i am a beginner.