LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 273
Default Return list of file names from specific directory

I am in need of VBA code where I can return a list of file names located in a
specific directory. My workbook contains the directory path (e.g.,
O:\Budgets\2008) in cell A1 of sheet1. Cell B1 contains a header, so I'd
like the list of file names to begin in cell B2 and continue down column B
until all files are listed.

If there are only two files in this directory (e.g., Store1.xls &
Store2.xls), I'd expect Store1.xls to be listed in cell B2 and Store2.xls to
be listed in cell B3.

I don't want to hard code the directory path in the code. Instead I'd like
to keep it flexible and refer to the value in cell A1.

Any help would be greatly appreciated. Thank you.
 
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
return a list of names, from a large list of repeated names. The Fru Fru Excel Worksheet Functions 5 December 10th 08 01:03 PM
Saving file to specific directory sungen99[_75_] Excel Programming 1 February 22nd 06 02:01 PM
to convert all the file names in one directory to .xls? S.G.Pillai Excel Discussion (Misc queries) 2 September 27th 05 05:13 PM
Getting file names in a directory John Excel Programming 2 March 8th 05 03:38 PM


All times are GMT +1. The time now is 06:50 AM.

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

About Us

"It's about Microsoft Excel"