jetzt gleich das nächste Problem.
Arbeit 16bit
Zuhause 32bit
wie kann ich das mit einem Code machen das es auf beiden Bit-Varianten läuft?
der 16Bit code:
Option Explicit
Private Declare
Function MakeSureDirectoryPathExists Lib "imagehlp.dll" (ByVal lpPath As String) As Long
Sub Ordner_erstellen()
Dim Zeilen As Long, Pfad As String, FullPfad As String, i As Long
Zeilen = Range("A65536").End(xlUp).Row
Pfad = Range("B1")
For i = 1 To Zeilen
FullPfad = Pfad & Cells(i, 1) & "\" & Range("C1") & "\"
Call MakeSureDirectoryPathExists(FullPfad)
Next i
End
Sub
mein Ergebnis nachdem ich gesucht habe:
' Modul: Modul1 Typ: Allgemeines Modul
Option Explicit
#If Win64 Then
Private Declare PtrSafe
Function apiCreateFullPath Lib "imagehlp.dll" Alias _
"MakeSureDirectoryPathExists" (ByVal lpPath As String) As Long
#Else
Private Declare
Function apiCreateFullPath Lib "imagehlp.dll" Alias "MakeSureDirectoryPathExists" _
(ByVal lpPath As String) As Long
#End If
Sub Ordner_erstellen()
Dim Zeilen As Long, Pfad As String, FullPfad As String, i As Long
Zeilen = Range("A65536").End(xlUp).Row
Pfad = Range("B1")
For i = 1 To Zeilen
FullPfad = Pfad & Cells(i, 1) & "\" & Range("C1") & "\"
Call MakeSureDirectoryPathExists(FullPfad)
Next i
End Sub
Irgendwie läuft nix.
Jemand einen Tipp bitte?
Danke
Marcus