Thanks crackwitz,
I’m just trying to recode an existing program with the same procedure and key functions because some of the old code’s packages are obsolete or incompatible with the new environment the project will be in. Thanks for the help, and I’ll see if it’s worth rewriting this part of the code or starting from scratch.