Be the first user to complete this post

  • 0
Add to List

FileSystemObject : CreateFolder Method


This function creates a Folder.

Format : 

objectOfFileSystemObject. CreateFolder(foldername)

  • objectOfFileSystemObjectAs the names says, it’s a FileSystemObject.
  • foldername
    • Mandatory
    • Type:     String
    • Folder will be created with the same name what you will pass here.
Function FnCreateFolder(strCompleteFolderPath)
   Set fso = CreateObject("Scripting.FileSystemObject")
   Set objFolder = fso. CreateFolder(strCompleteFolderPath)
End Function

Call FnCreateFolder ("c:\New Folder")

Also Read:

  1. FileSystemObject : FolderExists Method
  2. FileSystemObject : MoveFile Method
  3. FileSystemObject:OpenTextFile Method
  4. Excel-VBA : Insert Multiple Images from a Folder to Excel Cells
  5. VBA-Excel: Add/Insert multiple objects from a folder in an Excel Document.