A FileExists Function
Checks to see if a file exists.
Inputs
full file path(FullFileName as String)
Returns
True or False
Rate A FileExists Function
(20(20 Vote))
Private Function FileExists(FullFileName As String) As Boolean
On Error GoTo MakeF
'If file does not exist, there will be an error
Open FullFileName For Input As #1
Close #1
'no error, file exists
FileExists = True
Exit Function
MakeF:
'error, file does not exist
FileExists = False
Exit Function
End Function
A FileExists Function Comments
No comments yet — be the first to post one!
Post a Comment