P.T.A.M. Administrator

Joined: 08 Oct 2003 Posts: 752 Location: Greece
|
Posted: Oct 10th, 2003 08:57 AM Post subject: Check if file exists, non API way |
|
|
| Code: | Private Function FileExists(FileName As String) As Boolean
If Len(Dir$(FileName)) Then FileExists = True
End Function |
Usage :
| Code: | Private Sub Form_Load()
MsgBox FileExists("C:\test.txt")
End Sub |
_________________ No one is completely useless. They can at least be an example of what to avoid. |
|