Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find files
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! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find files
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 -- Ryan--- If this information was helpful, please indicate this by clicking ''Yes''. "xp" wrote: 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! |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find files
See he
http://www.exceltip.com/st/List_file...Excel/446.html You just need to add a check on the file name, maybe using instr() or "like". Tim "xp" wrote in message ... 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! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Where is "open/tools/find/find files that match these criteria"? | Excel Discussion (Misc queries) | |||
find files and open db | Excel Programming | |||
Moved files and can't find them | Excel Discussion (Misc queries) | |||
Find Files | Excel Programming | |||
Import multiple files macro can't find files | Excel Programming |