File Exists on Disk


Function DiskFileExists(sFilePathAndName As String) As Boolean

'Returns True if the file exists, False if it doesn’t

DiskFileExists = CBool(Len(Dir(sFilePathAndName)))

End Function

2 thoughts on “File Exists on Disk


Posting code? Use <pre> tags for VBA and <code> tags for inline.

Leave a Reply

Your email address will not be published.