C
cidc
HI, I´M NEEDING HELP FOR GETTING THE \"LAST SAVED BY\" FOR A SHARE
EXCEL FILE AND PLACE IT IN A CELL...
SO FAR I COULD GET THE \"AUTHOR\" NAME WITH
_=GETPROPERTY(\\"AUTHOR\\")__USING THE FOLLOWING PUBLIC FUNCTION
-Public Function GetProperty(P As String, Optional WorkbookName A
Variant)
Dim S As Variant
Dim WB As Workbook
On Error Resume Next
If IsMissing(WorkbookName) Then
If TypeOf Application.Caller Is Range Then
Set WB = Application.Caller.Parent.Parent
Else
Set WB = ActiveWorkbook
End If
Else
Set WB = Workbooks(WorkbookName)
End If
S = WB.CustomDocumentProperties(P)
If S <> "" Then
GetProperty = S
Exit Function
End If
On Error GoTo EndMacro
GetProperty = WB.BuiltinDocumentProperties(P)
Exit Function
EndMacro:
GetProperty = ""
End Function-
THANKS IN ADVANCE FOR ANY HELP YOU MAY SEND.
EXCEL FILE AND PLACE IT IN A CELL...
SO FAR I COULD GET THE \"AUTHOR\" NAME WITH
_=GETPROPERTY(\\"AUTHOR\\")__USING THE FOLLOWING PUBLIC FUNCTION
-Public Function GetProperty(P As String, Optional WorkbookName A
Variant)
Dim S As Variant
Dim WB As Workbook
On Error Resume Next
If IsMissing(WorkbookName) Then
If TypeOf Application.Caller Is Range Then
Set WB = Application.Caller.Parent.Parent
Else
Set WB = ActiveWorkbook
End If
Else
Set WB = Workbooks(WorkbookName)
End If
S = WB.CustomDocumentProperties(P)
If S <> "" Then
GetProperty = S
Exit Function
End If
On Error GoTo EndMacro
GetProperty = WB.BuiltinDocumentProperties(P)
Exit Function
EndMacro:
GetProperty = ""
End Function-
THANKS IN ADVANCE FOR ANY HELP YOU MAY SEND.