Syntax

expression.CreatedDate

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 created is earlier than today.

Visual Basic for Applications
 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.CreatedDate If dtmFileDate < dtmMidnight Then strOlderFiles = strOlderFiles & swsFile.URL & vbCrLf End If Next MsgBox "Files older than today: " & vbCrLf & strOlderFiles, _ vbInformation + vbOKOnly, "Older Files" Set swsFile = Nothing 

See also: