Syntax

expression.CreatedBy

expression A variable that represents a SharedWorkspaceFile object.

Return Value
String

Example
The following example lists files in the shared workspace site that were created by users other than the creator of the workspace site.

Visual Basic for Applications
 Dim swsFile As Office.SharedWorkspaceFile Dim swsOwner As Office.SharedWorkspaceMember Dim strMemberFiles As String Set swsOwner = ActiveWorkbook.SharedWorkspace.Members(1) For Each swsFile In ActiveWorkbook.SharedWorkspace.Files If swsFile.CreatedBy <> swsOwner.Name Then strMemberFiles = strMemberFiles & swsFile.URL & vbCrLf End If Next MsgBox "These files were created by other users:" & _ vbCrLf & strMemberFiles, _ vbInformation + vbOKOnly, "Files Created by Other Users" Set swsOwner = Nothing Set swsFile = Nothing 

See also: