Thanks for the reply Mike. I have tried the above code but it is not working for me