Sub GetNames() Application.Calculation = xlCalculationManual
Dim raz, i, z, y, col As Integer
' Очистка
Range("b:b").Select
Selection.ClearContents
x = 6
Set fs = Application.FileSearch
With fs
.LookIn = ThisWorkbook.ActiveSheet.Range("f2").Value
' .FileType = msoFileTypeAllFiles
' .FileType = TypeAllFiles
.FileType = msoFileTypeExcelWorkbooks
' .Filename = "*.*"
.SearchSubFolders = False
' Workbooks("Folien Print.xls").Worksheets("Names").Cells(1, 2).Value = "There were " & .FoundFiles.Count & " file(s) found."
.Execute ' Для обновление поиска
For i = 1 To .FoundFiles.Count
x = x + 1
ThisWorkbook.Worksheets("Names").Cells(x, 2).Value = .FoundFiles(i)
Next i
ThisWorkbook.Worksheets("Names").Range("c5").Value = .FoundFiles.Count
End With
Application.Calculation = xlCalculationAutomatic
Calculate
End Sub