Find files

  • Thread starter Thread starter xp
  • Start date Start date
X

xp

I need a function that, given a core path and a file name with no extension,
can loop through all subfolders in the core path, and return all file names
that match (excluding the file extension when matching), but the returned
file names must include the extension...

Any clues?

Thanks much in advance!
 
I think you want something like this:
Sub FindFiles()

Dim Filename As Variant
Filename = Application.GetOpenFilename(FileFilter:="Excel File
(*.xls),*.xls", MultiSelect:=True)
If TypeName(Filename) <> "Boolean" Then
Range("A1").Resize(UBound(Filename, 1) - LBound(Filename, 1) + 1).Value =
Application.Transpose(Filename)
End If

Dim lngRow As Long, lngLastRow As Long
lngLastRow = ActiveSheet.Cells(Rows.Count, "A").End(xlUp).Row
For lngRow = 1 To lngLastRow
Next

End Sub
 
Back
Top