'check if file exist and when found show the location 'btw: it will only find the first one! 'just change the code to find all 'use as: 'MsgBox FindFile("c:\", vFile$) & vFile$ Public Function FileExist(Path$)Returnas
Integerdim
x x = FreeFile On Error Resume Nextopen
Path$ Forinput
as
x If Err = 0 Then FileExist = True Else FileExist = Falseend
Ifclose
x End Function Public Function FindFile(ByVal Pathas
String, ByVal Fileas
String)as
Stringdim
DirNameas
String, LastDiras
String If File = "" Thenexit
Function If Right(Path, 1) <> "\" Then Path = Path & "\" DirName = Dir(Path & "*.*", vbDirectory)do
While Not FileExist(Path & File) If DirName = "" Thenexit
Do DoEvents If DirName <> "." And DirName <> ".." Then If (GetAttr(Path & DirName) And vbDirectory) = vbDirectory Then LastDir = DirName DirName = FindFile(Path & DirName & "\", File) If DirName <> "" Then Path = DirNameexit
Doend
If DirName = Dir(Path, vbDirectory)do
Until DirName = LastDir Or DirName = "" DirName = Dir Loop If DirName = "" Thenexit
Doend
Ifend
If DirName = Dir Loop If FileExist(Path & File) Then FindFile = Path End Function