Last Author and Date with a twist

jasperuk

New Member
Joined
Jan 11, 2017
Messages
4
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
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
I think:
Workbooks("MyOtherWorkbookName.xlsx").BuiltinDocumentProperties("Last Author")
Try it out and let me know if it works.
Have a nice day!
 
Upvote 0
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
 
Upvote 0
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!
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,248
Members
452,623
Latest member
cliftonhandyman

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top