Returns or sets a constant that represents the amount of time since the specified file was last modified and saved. The default value is msoLastModifiedAnyTime. Read/write MsoLastModified.
MsoLastModified can be one of these MsoLastModified constants. |
msoLastModifiedAnyTime |
msoLastModifiedLastMonth |
msoLastModifiedLastWeek |
msoLastModifiedThisMonth |
msoLastModifiedThisWeek |
msoLastModifiedToday |
msoLastModifiedYesterday |
Example
This example sets options for a file search. The files this search returns were modified yesterday and are located in the C:\My Documents folder or in one of its subfolders.
Set fs = Application.FileSearch
With fs
.LookIn = "C:\My Documents"
.SearchSubFolders = True
.LastModified = msoLastModifiedYesterday
End With