C
Chad
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.
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.