Mega Code Archive

 
Categories / VisualBasic Script / Application
 

Find files

Sub findFile()    With Application.FileSearch         .NewSearch         .LookIn = "c:\BegVBA"         .FileName = "store.mdb"         .SearchSubFolders = True             If .Execute() > 0 Then                msgBox "The file " & .FoundFiles(1) & " was found"              Else                 msgBox "The file is not found"             End If     End With End Sub