Option Explicit
Private Declare Function SHCreateDirectoryEx Lib "Shell32.dll" Alias "SHCreateDirectoryExA" _
(ByVal hwnd As Long, ByVal pszPath As String, ByVal lngsec As Long) As Long
Private Sub CreationDossier(sNomRep As String)
'ChDrive "D"
SHCreateDirectoryEx 0&, sNomRep, 0&
End Sub
Sub Tst()
Dim Rep As String
Rep = "D:\repA\repB\repC\RepD"
CreationDossier Rep
End Sub