How about this?
Sub ListThem()
Dim startRange As Range
Sheet1.Cells.Clear
Set startRange = Sheet1.Range("A1")
'Parent Directory - Change this to whichever directory you want to use
ListFoldersAndInfo "C:\Documents and Settings\Administrator\My Documents", startRange
End Sub
Sub ListFoldersAndInfo(foldername As String, Destination As Range)
Dim FSO As Object
Dim Folder As Object
Dim R As Long
Dim SubFolder As Object
Dim Wks As Worksheet
Set FSO = CreateObject("Scripting.FileSystemObject")
Set Folder = FSO.GetFolder(foldername)
For Each SubFolder In Folder.SubFolders
Destination = SubFolder.Name
Destination.Offset(0, 1) = SubFolder.Path
Destination.Offset(0, 2) = SubFolder.Size
Set Destination = Destination.Offset(1, 0)
Next SubFolder
Set FSO = Nothing
End Sub
Dom
Bookmarks