ModifiedDate Property

Microsoft Office Visual Basic

ModifiedDate Property

Returns the date and time when the shared workspace object was last modified. Read-only Variant.

expression.ModifiedDate

expression    Required. An expression that returns one of the objects in the Applies To list.

Remarks

The SharedWorkspaceFolder and SharedWorkspaceMember objects do not have a ModifiedDate property.

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 & swsFile.URL & vbCrLf
        End If
    Next
    MsgBox "Files not modified today: " & vbCrLf & strOlderFiles, _
        vbInformation + vbOKOnly, "Older Files"
    Set swsFile = Nothing