Thanks
@Mike Rajkowski.
The way our system is setup is when you login it runs a program that opens a lot of commonly used files so they are "assumed" open in most other programs that run after login. Since uopy is calling directly to the Subroutine they obviously weren't open. I now call the routine to open these files first then did the rest of my test routine and it worked flawlessly. Thank you for your help!