View Single Post
  #6   Report Post  
Don Guillett
 
Posts: n/a
Default

glad it helped. Certainly something I got from someone here a long time ago.

--
Don Guillett
SalesAid Software

"Greg B" wrote in message
...
Thanks for that

Greg
"Don Guillett" wrote in message
...
Here are a couple you might try

Sub GetFileList()
Dim iCtr As Integer
With Application.FileSearch
.NewSearch
.LookIn = "c:\aa"
.SearchSubFolders = True
.Filename = ".xls"
If .Execute 0 Then
For iCtr = 1 To .FoundFiles.Count
Cells(iCtr, 1).Value = .FoundFiles(iCtr)
Next iCtr
End If
End With
End Sub

Sub FindExcelFiles()
Application.ScreenUpdating = False
Dim FN As String ' For File Name
Dim ThisRow As Long
Dim FileLocation As String
FileLocation = "c:\ahorse\*.xls"
FN = Dir(FileLocation)
Do Until FN = ""
ThisRow = ThisRow + 1
Cells(ThisRow, 1) = FN
FN = Dir
Loop
Application.ScreenUpdating = True
End Sub
--
Don Guillett
SalesAid Software

"Greg B" wrote in message
...
Is there anyway to have excel list files in a dirctory?

Thanks in advance.

Greg