VBA CreateFolder

The FileSystemObject VBA CreateFolder method creates a new folder. An error will be raised if folder Exists. Use the VBA FolderExists method to check if folder exists.

VBA CreateFolder Syntax

fso.CreateFolder( foldername )

foldername
Name of the folder to be created.

VBA CreateFolder Examples

Set fso = CreateObject("Scripting.FileSystemObject")

'Create NewFolder
fso.CreateFolder "C:\Src\NewFolder"