Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Can someone help me create a macro that lists excel files in a folder
and also gets the date the file was created and last modified? I found this macro on the web, but it just gets the filenames: Public Sub ListWorkbooks() Dim Directory As String Dim FileName As String Dim IndexSheet As Worksheet Dim rw As Long 'Change the directory below as needed Directory = "R:\07\" If Left(Directory, 1) < "\" Then Directory = Directory & "\" End If rw = 1 Set IndexSheet = ThisWorkbook.ActiveSheet FileName = Dir(Directory & "*.xls") Do While FileName < "" IndexSheet.Cells(rw, 1).Value = FileName rw = rw + 1 FileName = Dir Loop Set IndexSheet = Nothing End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
File list - list filenames in excel | Excel Programming | |||
List Filenames from Folder | Excel Programming | |||
Getting a list of filenames | Excel Programming | |||
Getting a list of filenames | Excel Programming | |||
List out FileNames.xls with K4 Blank | Excel Programming |