UtterAccess HomeUtterAccess Wiki

Welcome Guest ( Log In | Register )

Custom Search
Edit Discussion
> FileExists    

A quick and simple function to check for the existence of a file using the Dir() funcion. Note this is not a perfect implementation... the function may not differentiate files from folders, for example. For more information, see the VBA Dir() help file.

CODE
Public Function FileExists(strFileName As String) As Boolean
 FileExists = Len(Dir(strFileName))
End Function

SeeAlso: DirectoryExists


Creative Commons License
FileExists by UtterAccess Wiki is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Editing and revision of the content is freely encouraged; for details, see Expected Usage.

Edit Discussion
Custom Search
Thank you for your support!
This page has been accessed 2,227 times.  This page was last modified 10:19, 10 September 2012 by Jack Leach.   Disclaimers