Hi !
I found a Helpful Tip ! Thanks to the Author ebgreen and i want to share with you this code, may be help somebody else (-_°)
This Sub will create a folder and the entire path to the folder if needed.
I found a Helpful Tip ! Thanks to the Author ebgreen and i want to share with you this code, may be help somebody else (-_°)
This Sub will create a folder and the entire path to the folder if needed.
Code:
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''
'' Sub SmartCreateFolder(strFolder)
'' Author: ebgreen
'' Purpose: Creates a folder building the entire path if needed.
'' Takes: strFolder - The complete path of the folder to create
'' Returns: Nothing
'' Revision History:
'' 12/23/05 RMD Created
''
'' To Do:
'' Nothing at present
''
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Sub SmartCreateFolder(strFolder)
Dim oFSO:Set oFSO = CreateObject("Scripting.FileSystemObject")
If oFSO.FolderExists(strFolder) Then
Exit Sub
Else
SmartCreateFolder(oFSO.GetParentFolderName(strFolder))
End If
oFSO.CreateFolder(strFolder)
Set oFSO = Nothing
End Sub