Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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" wrote in message ... 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
getting filenames from a user selected folder | Excel Programming | |||
Look for a string in filenames in a folder? | Excel Programming | |||
Getting a list of filenames | Excel Programming | |||
Help with a Macro to list all filenames and mod dates in a folder | Excel Programming | |||
Folder and filenames? | Excel Programming |