Results 1 to 4 of 4

Thread: Last Author and Date with a twist
Thanks Thanks: 0 Likes Likes: 0

  1. #1
    New Member
    Join Date
    Jan 2017
    Posts
    4
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Last Author and Date with a twist

    Hi

    I have mastered getting the last author and date from the fileA i have open my master file but i would also like to pull the author and date from another file i have open at the same time, my data input file to see when the last time the data input file was updated.

    at the moment i am using these and only works for the file i am in


    Function getLastModifiedUser()
    getLastModifiedUser = ActiveWorkbook.BuiltinDocumentProperties("Last Author")
    End Function
    Function LastModified() As Date
    LastModified = ActiveWorkbook.BuiltinDocumentProperties("Last Save Time")
    End Function


    Any Help i presume i need to change from Activeworkbook ???

    Gavin

  2. #2
    Board Regular
    Join Date
    Mar 2002
    Location
    Cincinnati, Ohio, USA
    Posts
    6,867
    Post Thanks / Like
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Last Author and Date with a twist

    I think:
    Workbooks("MyOtherWorkbookName.xlsx").BuiltinDocumentProperties("Last Author")
    Try it out and let me know if it works.
    Have a nice day!

  3. #3
    New Member
    Join Date
    Jan 2017
    Posts
    4
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Last Author and Date with a twist

    Quote Originally Posted by Tom Schreiner View Post
    I think:
    Workbooks("MyOtherWorkbookName.xlsx").BuiltinDocumentProperties("Last Author")
    Try it out and let me know if it works.
    Have a nice day!
    Morning

    Thanks for the code the only problem is it only works when the other file is open, can I get the info from a saved file that could be open or closed ?

    Gavin

  4. #4
    Board Regular
    Join Date
    Mar 2002
    Location
    Cincinnati, Ohio, USA
    Posts
    6,867
    Post Thanks / Like
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Last Author and Date with a twist

    Sure. You could write several functions in VBA to determine if the workbook is already open within the calling instance. If it is open, grab the property. If not, open the workbook silently, fetch your property, and close it.


    However, I'm betting that there is a way to grab it from the XML file by way of the OpenDocument format. I don't have time to look into it right now. Maybe search on 'OpenDocument format BuiltinDocumentProperties'. Let me know if you find anything. In any case, we can solve your problem.


    Have a good one!

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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