+ Reply to Thread
Results 1 to 5 of 5

"LAST SAVED BY".... (Help)

  1. #1
    Registered User
    Join Date
    06-06-2006
    Posts
    2

    Question "LAST SAVED BY".... (Help)

    Hi, I´m needing help for getting the "Last Saved by" for a shared 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 As 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.-
    -----------------------------------------------------------------

  2. #2
    Bob Phillips
    Guest

    Re: "LAST SAVED BY".... (Help)

    Use Last Author rather than Author.

    --
    HTH

    Bob Phillips

    (replace somewhere in email address with gmail if mailing direct)

    "cidc" <[email protected]> wrote in message
    news:[email protected]...
    >
    > HI, I´M NEEDING HELP FOR GETTING THE \"LAST SAVED BY\" FOR A SHARED
    > 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 As
    > 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.-
    > -----------------------------------------------------------------
    >
    >
    > --
    > cidc
    > ------------------------------------------------------------------------
    > cidc's Profile:

    http://www.excelforum.com/member.php...o&userid=35154
    > View this thread: http://www.excelforum.com/showthread...hreadid=549183
    >




  3. #3
    Registered User
    Join Date
    06-06-2006
    Posts
    2

    Question

    Thank you, very much Bob...

    I've tryed, and it did work in the local computer(where the file is), when I make the changes on a Networked computer and saved it, it keeps always the local user's name even though the "File Properties - Statistics" shows the remote computer's user name...

    Any idea why it does not update the "Last Author" name?

    Regards, and Thanks again...




    [QUOTE=Bob Phillips]Use Last Author rather than Author.

    --
    HTH

    Bob Phillips

  4. #4
    Gary Keramidas
    Guest

    Re: "LAST SAVED BY".... (Help)

    i just use
    Range("K2").Value = "Saved by " & Environ("UserName")

    in a workbook_beforesave module


    what's wrong with this? works for my needs

    --


    Gary


    "Bob Phillips" <[email protected]> wrote in message
    news:[email protected]...
    > Use Last Author rather than Author.
    >
    > --
    > HTH
    >
    > Bob Phillips
    >
    > (replace somewhere in email address with gmail if mailing direct)
    >
    > "cidc" <[email protected]> wrote in message
    > news:[email protected]...
    >>
    >> HI, I´M NEEDING HELP FOR GETTING THE \"LAST SAVED BY\" FOR A SHARED
    >> 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 As
    >> 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.-
    >> -----------------------------------------------------------------
    >>
    >>
    >> --
    >> cidc
    >> ------------------------------------------------------------------------
    >> cidc's Profile:

    > http://www.excelforum.com/member.php...o&userid=35154
    >> View this thread: http://www.excelforum.com/showthread...hreadid=549183
    >>

    >
    >




  5. #5
    Bob Phillips
    Guest

    Re: "LAST SAVED BY".... (Help)

    Can you turn off Caps Lock please?

    I don't understand your point. What Remote user?

    --
    HTH

    Bob Phillips

    (replace somewhere in email address with gmail if mailing direct)

    "cidc" <[email protected]> wrote in message
    news:[email protected]...
    >
    > THANK YOU, VERY MUCH BOB...
    >
    > I'VE TRYED, AND IT DID WORK IN THE LOCAL COMPUTER(WHERE THE FILE IS),
    > WHEN I MAKE THE CHANGES ON A NETWORKED COMPUTER AND SAVED IT, IT KEEPS
    > ALWAYS THE LOCAL USER'S NAME EVEN THOUGH THE \"FILE PROPERTIES -
    > STATISTICS\" SHOWS THE REMOTE COMPUTER'S USER NAME...
    >
    > ANY IDEA WHY IT DOES NOT UPDATE THE \"LAST AUTHOR\" NAME?
    >
    > REGARDS, AND THANKS AGAIN...
    >
    >
    >
    > Bob Phillips Wrote:
    > > Use Last Author rather than Author.
    > >
    > > --
    > > HTH
    > >
    > > Bob Phillips

    >
    >
    > --
    > cidc
    > ------------------------------------------------------------------------
    > cidc's Profile:

    http://www.excelforum.com/member.php...o&userid=35154
    > View this thread: http://www.excelforum.com/showthread...hreadid=549183
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1