devxlogo

DirExists – Check that a directory exists

DirExists – Check that a directory exists

' 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 vbDirectoryErrorHandler:    ' if an error occurs, this function returns FalseEnd Function

devx-admin

Share the Post: