I corrected it but CMRN is still getting sent. I will need to come back to it later as have some urgent work to do but wanted to say that I really appreciate your help.

Thank you for your prompt reply. It is complaining about the for each loop in my case.