What is the syntax to create a folder?

Dim FSo
Dim sFolder As String
sFolder = “<filepath for the folder you want to create>
Set FSO = CreateObject(“Scripting.FileSystemObject”)

If Not FSO.FolderExists(sFolder)Then
   FSO.CreateFolder(sFolder)
   MsgBox(“Folder Created”)
Else
   MsgBox(“Folder already Exists”)
End If

To learn how to find a folder’s filepath, click here.

Advertisements