Sub test()
Dim arr, arrTemp
Dim strPath As String
Dim strTemp
Dim i As Long, j As Long
On Error Resume Next
strPath = ThisWorkbook.Path & Application.PathSeparator
arr = Sheet1.Range("a1").CurrentRegion
For i = LBound(arr) + 1 To UBound(arr)
strTemp = strPath
arrTemp = Split(arr(i, 1), "\")
For j = LBound(arrTemp) To UBound(arrTemp)
strTemp = strTemp & arrTemp(j) & Application.PathSeparator
MkDir strTemp
Next
Next
End Sub
这个用起来挺好的,可以实现创建多级文件夹。大家可以参考。