Private Declare Function MakePath Lib "imagehlp.dll" _
Alias "MakeSureDirectoryPathExists" (ByVal lpPath As String) As Long
Sub Pfad_erzeugen()
Dim lngResult As Long, lngZ As Long
Dim strOrdner As String, strUnterordner As String
strOrdner = [B2].Value & "\" 'Mit "\" am Ende !!
'Oder auch :
'strOrdner = "C:\Irgend\ein\beliebiger\langer\Pfad\" 'Mit "\" am Ende !!
For lngZ = 3 To Cells(Rows.Count, 1).End(xlUp).Row
If Cells(lngZ, 1) <> "" Then lngResult = MakePath(strOrdner)
Next
End Sub
Gruß, NoNetPrivate Declare Function MakePath Lib "imagehlp.dll" _
Alias "MakeSureDirectoryPathExists" (ByVal lpPath As String) As Long
Sub Pfad_erzeugen()
Dim lngResult As Long, lngZ As Long
Dim strOrdner As String
strOrdner = [B2].Value & "\" 'Mit "\" am Ende !!
'Oder auch :
'strOrdner = "C:\Irgend\ein\beliebiger\langer\Pfad\" 'Mit "\" am Ende !!
For lngZ = 3 To Cells(Rows.Count, 1).End(xlUp).Row
If Cells(lngZ, 1) <> "" Then lngResult = MakePath(strOrdner & Cells(lngZ, 1).Value)
Next
End Sub
Gruß, NoNet