View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Don Guillett
 
Posts: n/a
Default List all filenames & tab names

I think you would have to use DIR to get the names of
Sub FindExcelFiles() 'It does work.
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

within the for/loop, LIst the fileopen the file and incorporate something
like this to get the sheets

For i = 1 To Sheets.Count
Cells(i, 1).Value = Sheets(i).Name
Next i


--
Don Guillett
SalesAid Software

"Deeds" wrote in message
...
What I would like to do is, within Excel, create a list down one column of
all the file names within a certain folder. Listed with the filename,
somehow, I would like to have a list of all the tab names within each of
the
listed file names.
Any ideas?
Thanks again!