Hat jemand dieses Problem schon gelöst ? Irgendwie reichen meine VBA-Kenntnisse nicht um auf Ordner zuzugreifen.
Vielen Dank für eure Hilfe.
Thomas
Sub Dateieigenschaften()
Const STRFOLDER As String = "C:\Eigene Dateien"
Dim objShell As Object, objFolder As Object
Dim x As Byte, intColumn As Integer, lngRow As Long
Dim varName, arrHeaders(34)
If Dir(STRFOLDER, 16) = "" Then
MsgBox "Der Ordner " & STRFOLDER & " wurde nicht gefunden!" & Space(10), 64, "weise hin..."
Exit Sub
End If
Application.ScreenUpdating = False
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace(STRFOLDER)
intColumn = 1
For x = 0 To 33
arrHeaders(x) = objFolder.GetDetailsOf(varName, x)
Cells(1, intColumn + x) = arrHeaders(x)
Next
Rows(1).Font.Bold = True
lngRow = 2
For Each varName In objFolder.Items
For x = 0 To 33
Cells(lngRow, intColumn + x) = objFolder.GetDetailsOf(varName, x)
Next
lngRow = lngRow + 1
Next
Columns.AutoFit
Application.ScreenUpdating = True
End Sub