Dear Alan,
Thanks for your time and attempt.
I tried your code but unfortunately it is giving the same error as per the previous code posted by me.

I am not sure what is the reason.

I tried it on a different machine also but no success.

If you wish you can rewrite it according to your expertise.
I have not posted it on any other forum(s).

Thanks once again for your time and help.