У нас вы можете посмотреть бесплатно Quickly Find All files within a folder and sub folder in Excel VBA - Code Included или скачать в максимальном доступном качестве, видео которое было загружено на ютуб. Для загрузки выберите вариант из формы ниже:
Если кнопки скачивания не
загрузились
НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если возникают проблемы со скачиванием видео, пожалуйста напишите в поддержку по адресу внизу
страницы.
Спасибо за использование сервиса ClipSaver.ru
Grab the Free VBA Quick Reference Guide https://www.chrisjterrell.com/excel-v... In this video we use a nice little piece of code that will find all of the files within a folder and all of its subfolders. A Subscriber requested this video as he was reminiscing of ages gone by when Excel 2003 had a file search function NOTE: Since this is pulling all the folder and subfolders it could take a lot of time and return a bunch of files CODE: ============== Sub Find_Files() Dim fldr As FileDialog Set fldr = Application.FileDialog(msoFileDialogFolderPicker) fldr.Show f = fldr.SelectedItems(1) f = f & "\" ibox = InputBox("File Must Contain (Note * wildcards can be used)", , "*.xls*") On Error GoTo ext sn = Split(CreateObject("wscript.shell").exec("cmd /c Dir """ & f & ibox & """ /s /a /b").stdout.readall, vbCrLf) Sheets(1).Cells(1).Resize(UBound(sn) + 1) = Application.Transpose(sn) ext: End Sub