FileExist (2)




'Return True if a file exists

Function FileExists(FileName As String) As Boolean
On Error GoTo ErrorHandler
' get the attributes and ensure that it isn't a directory

FileExists = (GetAttr(FileName) And vbDirectory) = 0
ErrorHandler:
' if an error occurs, this function returns False

End Function











( fileexist2.html )- by Paolo Puglisi - Modifica del 17/12/2023