Eric,
Je me suis penche sur les API, et j'ai trouve la solution...
Ci dessous, le pgm complet
--------------------------------------------------------------------------------------------
Option Explicit
Const MAX_PATH = 260
Private Declare Function SearchTreeForFile Lib "IMAGEHLP.DLL" (ByVal lpRootPath As String, ByVal lpInputName As String, ByVal lpOutputName As String) As Long
Private Declare Function GetLogicalDrives Lib "KERNEL32" () As Long
Private Sub Find_Click()
'Gather connected drive
Dim strDrives() As String
Dim intCount As Integer
Dim intIndex As Integer
Dim intDriveCount As Integer
intDriveCount = GetLogicalDrives
For intCount = 0 To 25
If (intDriveCount And 2 ^ intCount) <> 0 Then
ReDim Preserve strDrives(intCount) As String
strDrives(intCount) = Chr$(65 + intCount) & ":\"
End If
Next intCount
Dim iRow, iColumn, i As Integer
iRow = ThisWorkbook.Sheets(1).Range("First_Drive").Cells.row
iColumn = ThisWorkbook.Sheets(1).Range("First_Drive").Cells.column
For i = 0 To UBound(strDrives)
If strDrives(i) = Empty Then strDrives(i) = "..."
ThisWorkbook.Sheets(1).Cells(iRow + i, iColumn).Value = strDrives(i)
Next i
'Gather file to find information
Dim RootName, Name, FilePath As String
RootName = ThisWorkbook.Sheets(1).Range("Root").Value
If RootName <> Empty Then RootName = RootName & ":\"
Name = ThisWorkbook.Sheets(1).Range("File_Name").Value
FilePath = ""
FilePath = FindFile(RootName, Name)
If FilePath = Empty Then FilePath = "File not found..."
ThisWorkbook.Sheets(1).Range("File_Path").Value = FilePath
End Sub
Public Function FindFile(ByVal RootPath As String, ByVal FileName As String) As String
''Karl Moore, http://www.vbworld.com/files/tip529.html
'
'
Dim lNullPos As Long
Dim lResult As Long
Dim sBuffer As String
On Error GoTo FileFind_Error
'fournit par défaut le lecteur courant si non spécifié (fs)
If RootPath = "" Then RootPath = Left$(CurDir, 3)
'Allocate buffer
sBuffer = Space(MAX_PATH * 2)
'Find the file
lResult = SearchTreeForFile(RootPath, FileName, sBuffer)
'Trim null, if exists
If lResult Then
lNullPos = InStr(sBuffer, vbNullChar)
If Not lNullPos Then
sBuffer = Left(sBuffer, lNullPos - 1)
End If
'Return filename
FindFile = sBuffer
Else
'Nothing found
FindFile = vbNullString
End If
Exit Function
FileFind_Error:
FindFile = vbNullString
End Function