In reply to dave_59:
Hi Dave!
Thanks for suggesting code tags, its makes the code lot more readable, I will use it consistently in this forum going forward.
I have fixed the typos, Could you please help in identifying the issue in the above code and it would be really helpful.
Thanks!