LastModified Property

Applies To

FileSearch object.

Description

Returns or sets a constant that represents the amount of time since the specified file was last modified and saved. Can be one of the following MsoLastModified constants: msoLastModifiedAnyTime, msoLastModifiedLastMonth, msoLastModifiedLastWeek, msoLastModifiedThisMonth, msoLastModifiedThisWeek, msoLastModifiedToday, or msoLastModifiedYesterday. The default value is msoLastModifiedAnyTime. Read/write Variant.

See Also

NewSearch method.

Example

This example sets options for a file search. The files that this search will return have been previously modified and are located in the C:\My Documents folder or in a subfolder of that folder.

Set fs = Application.FileSearch
With fs
    .LookIn = "C:\My Documents"
    .SearchSubFolders = True
    .LastModified = msoLastModifiedYesterday
End With