In my program, I want it to detect if a file is there - if it is not, then the necessary files and folders for my program haven't been created yet and will need to be. If it is there (which it would be after my program has been installed), then the program won't need installing.

Code:
Open Filepath & "\general\InstallDetect.txt" For Input As #FileName
On Error GoTo InstallProgram
Close #FileName
Despite the On Error Statement, it still gives an error. How can I prevent this?