DirExist




'Return True if a directory exists

'(the directory name can also include a trailing backslash)

Function DirExists(DirName As String) As Boolean
On Error GoTo ErrorHandler
' test the directory attribute

DirExists = GetAttr(DirName) And vbDirectory
ErrorHandler:
' if an error occurs, this function returns False

End Function












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