|
-
Oct 27th, 2000, 07:55 PM
#1
Thread Starter
Lively Member
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!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|