View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Rob van Gelder[_4_] Rob van Gelder[_4_] is offline
external usenet poster
 
Posts: 1,236
Default Help with a Macro to list all filenames and mod dates in a folder

Sub test()
Const cDir = "C:\Rosters\Nov 2004\"
Dim str As String

str = Dir(cDir)
Do Until str = ""
Debug.Print str, FileDateTime(cDir & str)
str = Dir
Loop
End Sub


--
Rob van Gelder - http://www.vangelder.co.nz/excel


"techmoney" wrote in message
m...
Can someone please show me how I can write a script to list all files
in a particular folder.

Example:

C:\Rosters\Nov 2004\

AAA.xls
BBB.doc
CCC.csv


I would like to have a list of the files on column A of a Excel
Spreadsheet...with Modified Date to. The number of files in the
folder will be dynamic

Thanks in advance!