Majid,
If you're getting a compile error and others are not (i.e. John and Rod) you either don't have all the references required added to your VBE to allow it to compile properly OR you missed one of those line continuations that Rod has in the original routine. Line continuations are underscores and they can trip you up if you aren't careful.
Earl
Thanks John,
I believe you that it works but I am not able to run it. Perhaps I am doing
somthing wrong? I gave it to IT to help me out.
I let you know the outcome
Regards,
Majid