Puoi usare un'API di Win:
codice:
Private Declare Function SearchTreeForFile Lib "imagehlp" (ByVal RootPath As String, ByVal InputPathName As String, ByVal OutputPathBuffer As String) As Long
Private Const MAX_PATH = 520
Dim strFile As String
Private Sub Command1_Click()
Dim tempStr As String, Ret As Long
Dim strdummy As String
tempStr = String(MAX_PATH, 0)
strdummy="NOMEFILE.TXT"
Ret = SearchTreeForFile("c:\", strdummy, tempStr)
If Ret <> 0 Then
debug.print Left$(tempStr, InStr(1, tempStr, Chr$(0)) - 1)
else
MsgBox "File non trovato"
end if
End Sub