creating a catalog of all excel files within a given directory...


Posted by rm on December 26, 2001 11:04 AM

Hello all,

Here is a good challenge: I would like to create a workbook that catalogs all excel workbooks located in a given directory (e.g. "C:\ThisDirectory\Excel").

The concept I have is to have a macro that runs each time the (catalog) workbook file is opened (Workbook_Open()). This macro will search a designated directory and create an updated listing of all excel files within that directory (except itself if in the same directory) in a clickable list (hyperlinks), then sort the list by alpha. Each hyperlink's displayed name will correspond to the excel filename with or without the ".xls" at the end (filename only, without path). Having a header row would be nice, but not necessary.

...sounds tough to me...Thanks, and Happy New Year!

rm

Posted by Tom Morales on December 26, 2001 11:23 AM



Posted by Tom Morales on December 26, 2001 11:26 AM

Using the code in the first part of that response will work. Just change the line:
strFileNameFilter = "*.DOC"
to
strFileNameFilter = "*.XLS"
Tom