Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I use code below to find the latest modified file in a directory. How can
can do that same thing an also set criteria to look for latest file modified beginning with "aaa*" . . . how to get newest "C:\Lee\" & "aaa*" Dim fNewest Set oFolder = CreateObject("scripting.filesystemobject").getfold er("C:\Lee\") For Each aFile In oFolder.Files If fNewest = "" Then Set fNewest = aFile Else If fNewest.DateLastModified < aFile.DateLastModified Then Set fNewest = aFile End If End If Next MsgBox fNewest.Name -- Thanks & Best Regards |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to Use DateLastModified Property in VBA? | Excel Discussion (Misc queries) | |||
wildcard | Excel Programming | |||
Wildcard | Excel Programming | |||
DateLastModified | Excel Worksheet Functions | |||
DateLastModified property date extraction | Excel Programming |