by Mohammed Gafoor (1 Submission)
Category: Files/File Controls/Input/Output
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Fri 9th December 2005
Date Added: Mon 8th February 2021
Rating:
(1 Votes)
Check if Folder Exists or not using filesystem Object
Public Function FolderExists(DirPath As String) As Boolean
On Error GoTo FolderErr
'Declare File System Object
Dim fso As Object
'Create File System Object
Set fso = CreateObject("Scripting.FileSystemObject")
'Check Wheather Folder exists or not
FolderPathExists = fso.FolderExists(sDir)
Exit Function
FolderErr:
MsgBox Err.Description, vbCritical, "Error "
FolderPathExist = False
End Function
'Please if any feedback let me know my email is [email protected]
'[email protected]