Hi,
I wonder if it's possible to populate a column in excel with filenames that
come from a folder. I need only to import only the file names and not any of
the data within the files.
All the files names that I need end with *.txt
Thanks,
Eskimo
Hi,
I wonder if it's possible to populate a column in excel with filenames that
come from a folder. I need only to import only the file names and not any of
the data within the files.
All the files names that I need end with *.txt
Thanks,
Eskimo
Try something like
Dim Rng As Range
Dim FName As String
Set Rng = Range("A1")
FName = Dir("H:\Test\*.txt") '<<< CHANGE PATH
Do Until FName = ""
Rng.Value = FName
Set Rng = Rng(2, 1)
FName = Dir()
Loop
--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
"Eskimo" <Eskimo@discussions.microsoft.com> wrote in message
news:1CD574C3-DA12-45F4-8B80-FDF8BAC67811@microsoft.com...
> Hi,
>
> I wonder if it's possible to populate a column in excel with
> filenames that
> come from a folder. I need only to import only the file names
> and not any of
> the data within the files.
>
> All the files names that I need end with *.txt
>
> Thanks,
>
> Eskimo
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks