I'm getting a run-time error '55' File Already Open when I try to close my program. I know I'm accessing a file when I close the program.

What is the best way to close the file when the program is closed or another solution?

Thanks