:: Function to find if file exists |
Author |
David Costelloe |
Language |
VB5, VB6 |
Operating
Systems |
Windows 95, 98 and NT |
Module |
Public Function FileExists(filename As String) As Boolean
FileExists = (Dir(filename, vbNormal Or vbReadOnly Or vbHidden Or
vbSystem Or vbArchive) <> "")
End Function |
Usage |
'Usage:
Private Sub Command1_Click()
If FileExists("C:\Config.sys") Then
MsgBox "Config.sys is available"
Else
MsgBox "Sorry Can't find Config.sys"
End If
End Sub |
|
|
|
|