Private Declare Function SHCreateDirectoryEx Lib "Shell32.dll" Alias "SHCreateDirectoryExA" _
(ByVal hwnd As Long, _
ByVal pszPath As String, _
ByVal lngsec As Long) As Long
Option Explicit
Private Function CreationDossier(sDossier As String) As Long
Dim Rep As Long
Rep = SHCreateDirectoryEx(0&, sDossier, 0&)
End Function
Sub CreationDossier_01()
Dim sDossier As String
sDossier = "C:\Essai1\Essai2\Essai3\Essai4\Essai5"
CreationDossier sDossier
End Sub