Table of Content

handy script to create new folder, will check folder exisiting or not before create.


Private Sub CreateFolder(folderpath)

Dim objFSO, objFolder
Set objFSO = CreateObject("Scripting.FileSystemObject")

If Not objFSO.FolderExists(folderpath) Then
    Set objFolder = objFSO.CreateFolder(folderpath)
Else
    MsgBox "Folder: " & folderpath & " existing!"
End If

End Sub