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