Find file with wild character
Sub findFile()
Dim i As Integer
With Application.FileSearch
.NewSearch
.LookIn = "c:\"
.FileName = "*.mdb"
.SearchSubFolders = True
If .Execute() > 0 Then
For i = 1 To .FoundFiles.count
Debug.Print .FoundFiles(i)
Next i
End If
End With
End Sub
Related examples in the same category