#1   Report Post  
Posted to microsoft.public.excel.programming
XP XP is offline
external usenet poster
 
Posts: 389
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,836
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 298
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Where is "open/tools/find/find files that match these criteria"? PJ Excel Discussion (Misc queries) 2 November 14th 08 04:11 PM
find files and open db Rivers Excel Programming 12 August 3rd 08 02:01 PM
Moved files and can't find them Irene Excel Discussion (Misc queries) 22 November 1st 07 06:38 PM
Find Files Bill[_30_] Excel Programming 5 September 2nd 05 07:36 PM
Import multiple files macro can't find files Steven Rosenberg Excel Programming 1 August 7th 03 01:47 AM


All times are GMT +1. The time now is 12:19 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"