Dim thing As Variant Set fso = CreateObject("Scripting.FileSystemObject") Set fld = fso.getFolder("strFolderPath") For Each thing In fld.Files ...... Next 遍历指定文件夹下所有的文件thing