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

SharedWorkspaceFile.CreatedDate Property (Office)

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

Gets the date and time when the shared workspace object was created. Read-only.

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.

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

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

See also

Concepts

SharedWorkspaceFile Object

Other resources

SharedWorkspaceFile Object Members

© 2018 Microsoft