Dim LookFile as String<br>
LookFile = ""<br>
LookFile = Dir("c:\myfile.dat")<br>
If LookFile = "" then<br>
File does not exist<br>
End-If<br>
<br>
Also check out the help for funtion DIR
'Insert the following code to your form:<br>
<br>
Private Sub Form_Load()<br>
'Replace the 'c:\autoexec.bat' with then name of the file (with his path) that<br>
'you want to check his existence<br>
If Dir$("c:\autoexec.bat" <> "" Then <br>
MsgBox ("The file exist"<br>
Else<br>
MsgBox ("The file does not exist"<br>
End If<br>
End Sub<br>
<br>
<p>Eric De Decker<br><a href=mailto:vbg.be@vbgroup.nl>vbg.be@vbgroup.nl</a><br><a href=
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.