|
-
Oct 31st, 2001, 02:24 PM
#1
Thread Starter
Hyperactive Member
open file
How can I ignore error messages when opening files that don't exist...
for exmaple: Open FilePath For Input As #fnum.
The filePath=c:\file.ini, doesn't exist. I want to end sub...
how can I check if the file doesn't exist?
thanks
-
Oct 31st, 2001, 02:26 PM
#2
VB Code:
If Dir$("c:\file.ini") <> "" Then
MsgBox "file exists"
Else
MsgBox "file doesn't exist"
End If
-
Oct 31st, 2001, 02:33 PM
#3
Thread Starter
Hyperactive Member
Thanks Hack...
How can I set a variable to the text to the right of the =?
Ex: name=MyName...
I want a variable (NameVar) to be set to "MyName"...
Thanks
-
Oct 31st, 2001, 03:30 PM
#4
I'm not sure I understand what you mean. Do you mean storing the name of the file you are looking for in a variable, and then running it through the Dirs$ function?
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
|