Dear MajP it doesn't work when I save it as module, I got sub or function not defined error. Than I did paste that on my same page with my code, than I saw the code sentence changed the reference but filename was still same. What was my mistake? You can see the pictures attached what happened...