Private Declare Function SHCreateDirectoryEx Lib "Shell32.dll" Alias "SHCreateDirectoryExA" _
(ByVal hwnd As Long, ByVal pszPath As String, ByVal lngsec As Long) As Long
Sub TestCréationDossier()
Dim Rep As String
Rep = "C:\repA\repB\repC\RepV"
nomdossier = Dir(Rep, vbDirectory)
If nomdossier <> Empty Then MsgBox ("Le dossier existe"): Exit Sub
SHCreateDirectoryEx 0&, Rep, 0&
MsgBox ("Le dossier " & Rep & " a été crée.")
End Sub