I need to check to see if a file exists.

I'm not home right now, and wanted to check the theory I have......

If I try to OPEN a file for input (txt based), and put in a on-error goto line will this work? I'm not for sure how to write this out exactly though.

Like:

--------
On Error Goto Error1
Open "C:\test.txt" For Input As #1
Close #1
Exit Sub 'found the file - it exists

Error1:
Open "C:\test.txt" For Output As #1
Close #1 'Make the file
-------------


Did I get the theory right, and (if so) is there an easier (better) way to do this?


thanks!