Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
List Files in a Directory
I have gotten this code from a previous post (Thank You "KAAK", this
runs very fast) and modified it to work for my specific purpose. The only thing I can't seem to get it to do is start its file listing in the second row ("B2"). Thanks in advance Sub ListFiles02() 'Using FileSearch to list the files in a directory Dim i As Integer i = 1 With Application.FileSearch ..NewSearch ..LookIn = "G:\06_Drawings\Drafting System\Standards\Blocks\Casework" ..Filename = "*.dwg" .SearchSubFolders = True '.SearchFolders = False ..Execute For i = 1 To .FoundFiles.Count Range("B" & i).Value = .FoundFiles(i) Range("C" & i).Value = FileDateTime(.FoundFiles(i)) 'Range("D" & i).Value = FileLen(.FoundFiles(i)) Next End With End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Combo box with list of xls files in a directory | Excel Discussion (Misc queries) | |||
List of Files in A Directory | Excel Discussion (Misc queries) | |||
make a list of files in a directory | Excel Programming | |||
Directory List of Excel Files | Excel Programming | |||
list box- list all files ina directory | Excel Programming |