I found this on the web, posted by Bob Wahr in 2003
Private Function FindFile(strFile As String)
Dim strSupPth As String
Dim varPaths As Variant
Dim intCnt As Integer
Dim strFnd As String
Dim strTest As String
Dim strDwgDir As String
strSupPth = ThisDrawing.GetVariable("acadprefix")
strDwgDir = ThisDrawing.GetVariable("dwgprefix")
strTest = Dir(CurDir & "\" & strFile, 31)
If strTest <> "" Then
strFnd = CurDir & "\" & strTest
Else
strTest = Dir(strDwgDir & "\" & strFile, 31)
If strTest <> "" Then
strFnd = strDwgDir & "\" & strFile
Else
If strSupPth <> "" Then
varPaths = Split(strSupPth, ";", -1, vbTextCompare)
For intCnt = 0 To UBound(varPaths)
strTest = Dir(varPaths(intCnt) & "\" & strFile, 31)
If strTest <> "" Then
strFnd = varPaths(intCnt) & "\" & strFile
Exit For
End If
Next intCnt
End If
End If
End If
FindFile = strFnd
End Function