' Excel_FileSearch searches for all Excel Workbooks in the working directory and displays the total. ' Alternative can use the Scripting Runtime add-in
Public Sub Excel_FileSearch()
Dim x As Integer
.LookIn = ThisWorkbook.Path
.FileName = "*.xls"
If .Execute > 0 Then
MsgBox .FoundFiles.Count & " workbooks were found."
For x = 1 To .FoundFiles.Count
MsgBox "No workbooks were found."