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

Share the Post:
Share on facebook
Share on twitter
Share on linkedin

Overview

Recent Articles: