- ©«¤l
- 976
- ¥DÃD
- 7
- ºëµØ
- 0
- ¿n¤À
- 1018
- ÂI¦W
- 0
- §@·~¨t²Î
- Win10
- ³nÅ骩¥»
- Office 2016
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2013-4-19
- ³Ì«áµn¿ý
- 2023-9-21
|
¦^´_ 3# millerch
½Ð´ú¸Õ¬Ý¬Ý¡AÁÂÁÂ
Sub test()
Dim a, fs, f, fc, f1
Set fs = CreateObject("Scripting.FileSystemObject")
Range("c4").Select
With Application.FileDialog(msoFileDialogFolderPicker)
.InitialFileName = "D:\"
.Title = "======= ¿ï¾Ü¸ê®Æ§¨ ========"
.Show
On Error GoTo EndSub:
a = .SelectedItems(1)
End With
Set f = fs.GetFolder(a)
Set fc = f.Files
For Each f1 In fc
With ActiveCell
.Value = f1.Path
.Offset(0, 1).Value = f1.Name
.Offset(0, 2).Value = f1.Size
.Offset(0, 3).Value = f1.Type
.Offset(0, 4).Value = f1.DateCreated
.Offset(0, 5).Value = f1.DateLastAccessed
.Offset(1, 0).Select
End With
Next
Set fs = Nothing
Set f = Nothing
Set fc = Nothing
EndSub:
End Sub |
|