Skip to main content

Vba code to create folder or directory with name and condition

Following Excel Vba Code to create the folder in a directory if path is not exists.

 


 

Sub Create_Local_folder()
Set fs = CreateObject(“Scripting.FileSystemObject”)
AttendanceLocalFolder = “C:” & “” & “MYNEWFOLDER”
If fs.FolderExists(AttendanceLocalFolder) = False Then fs.CreateFolder AttendanceLocalFolder

 

End Sub

Leave a Reply

Your email address will not be published. Required fields are marked *