Table of contents
TOC
Collapse the table of content
Expand the table of content

SharedWorkspaceFile.ModifiedDate Property (Office)

office 365 dev account|Last Updated: 6/12/2017
|
1 Contributor

Gets the date and time when the SharedWorkspaceFile object was last modified. Read-only.

Note Beginning with Microsoft Office 2010, this object or member has been deprecated and should not be used.

Syntax

expression. ModifiedDate

expression A variable that represents a SharedWorkspaceFile object.

Return Value

Variant

Example

The following example returns a list of shared workspace files whose date and time last modified is earlier than today.

Dim swsFile As Office.SharedWorkspaceFile 
    Dim dtmMidnight As Date 
    Dim dtmFileDate As Date 
    Dim strOlderFiles As String 
    dtmMidnight = CDate(FormatDateTime(Now, vbShortDate) & " 12:00:00 am") 
    For Each swsFile In ActiveWorkbook.SharedWorkspace.Files 
        dtmFileDate = swsFile.ModifiedDate 
        If dtmFileDate < dtmMidnight Then 
            strOlderFiles = strOlderFiles &amp; swsFile.URL &amp; vbCrLf 
        End If 
    Next 
    MsgBox "Files not modified today: " &amp; vbCrLf &amp; strOlderFiles, _ 
        vbInformation + vbOKOnly, "Older Files" 
    Set swsFile = Nothing

See also

Concepts

SharedWorkspaceFile Object

Other resources

SharedWorkspaceFile Object Members

© 2018 Microsoft