Sub asd()
Dim fso, fsFolder, fsFile, fsfolder2
Set fso = CreateObject("scripting.filesystemobject")
Set fsFolder = fso.GetFolder("c:\Program files")
Set DestRange = Range("A1")
DestRange.CurrentRegion.ClearContents
For Each fsfolder2 In fsFolder.subfolders
Set NewLine = DestRange.Offset(DestRange.CurrentRegion.Rows.Count, 0)
NewLine.Offset(0, 0).Value = fsfolder2.Name
NewLine.Offset(0, 1).Value = fsfolder2.Size
NewLine.Offset(0, 2).Value = fsfolder2.DateCreated
Next
Set fso = Nothing
Set fsFolder = Nothing
Set fsfolder2 = Nothing
End Sub
Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 53