Thanks for the solution and explanation Yannick. It's working perfectly now and I can finish converting my scripts.