Hi all
I would like to create a new folder, but only if it does not already exist.
Here is my code which does not work ...
I found the line with FileSystemObject on the Internet but it does not work ...
Thanks in advance ...
Rody
I would like to create a new folder, but only if it does not already exist.
Here is my code which does not work ...
Code:
Dim New_folder_name As String
New_folder_name = ThisWorkbook.Path & "\MyFolder"
Dim fso As New FileSystemObject
If Not fso.FolderExists(New_folder_name) Then
MkDir New_folder_name
Else
MsgBox " The folder already exists. "
End If
Thanks in advance ...
Rody