获取文件夹下所有文件

Sub ShowFileList()
Dim fs, f, f1, fc, s
Dim folderspec As String

folderspec = "C:\Users\ofu1\Desktop\A帳票設計書修正\設計書_SRA16_BK"


Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFolder(folderspec)
Set fc = f.Files
For Each f1 In fc
MsgBox f1.Name
Next

End Sub

 

posted @ 2017-04-07 16:40  Ouka傅  阅读(123)  评论(0编辑  收藏  举报