Answers for "excel vba if folder exists"

VBA
0

excel vba if folder exists

'Input parameters
    '@Param strFileFullPath: String. Full path to the folder.
    'Local path example: "C:/myFolder"
    'SharePoint path example: "\\my.sharepoint.com\Shared%20Documents"
        'Local network path example: "\\SOMEONES-PC\Users\Public\Documents"
'Output Parameters
    '@Param FolderExists: Boolean.
Function FolderExists(strFolderPath As String) As Boolean

    Dim objFSO As Object
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    If objFSO.FolderExists(strFolderPath) Then FolderExists = True
    Set objFSO = Nothing

End Function
Posted by: Guest on April-19-2022

Code answers related to "VBA"

Browse Popular Code Answers by Language