craigexcel
Active Member
- Joined
- Jun 28, 2006
- Messages
- 295
- Office Version
- 2016
- Platform
- Windows
I am using a system where Excel workbooks are attached to a 'request'. As I just found out this (accounting) monthend, these requests (including the attached workbook) can apparently be modified, but this can't be determined just by looking at the 'request' as presented in the system. I did some searching here, and since it appears VBA is real solution to try to get at this info, I tried a few snippets of code I found here last night, but without success. What I tried always returned the current date. Clearly I'm not skilled enough in my understanding of objects, etc to be able to navigate these waters.
One that I did try, since it seemed it would be very straightforward, was this:
Range("L1").Value = Format(ThisWorkbook.Builtin DocumentProperties("Last Save Time"), "short date")
Also, I can't do something like navigate thru a network folder of all these workbooks, and get the 'last modified date' of each, because this request system is a stand-alone system. But of course, maybe someone might have some ideas on that too.
Assuming VBA is the way I need to go, the code will need to be saved in a '[VBA] tools' workbook I created with various utility macros in it, which I will have open when accessing the 'requests' in this system. I'd like to be able to open the workbook attached to the request, run the code from my 'tools' workbook, and have the macro insert the 'last modified date' of the 'request's' workbook in some TBD cell in the target workbook. Then, if that date is < yesterday, then no further action (i.e. updates) need to be recorded.
I'm using Office 365.
Appreciate any thoughts you may have, or redirecting me to another thread maybe I've already read thru, but perhaps didn't have enough context or knowledge to understand.
One that I did try, since it seemed it would be very straightforward, was this:
Range("L1").Value = Format(ThisWorkbook.Builtin DocumentProperties("Last Save Time"), "short date")
Also, I can't do something like navigate thru a network folder of all these workbooks, and get the 'last modified date' of each, because this request system is a stand-alone system. But of course, maybe someone might have some ideas on that too.
Assuming VBA is the way I need to go, the code will need to be saved in a '[VBA] tools' workbook I created with various utility macros in it, which I will have open when accessing the 'requests' in this system. I'd like to be able to open the workbook attached to the request, run the code from my 'tools' workbook, and have the macro insert the 'last modified date' of the 'request's' workbook in some TBD cell in the target workbook. Then, if that date is < yesterday, then no further action (i.e. updates) need to be recorded.
I'm using Office 365.
Appreciate any thoughts you may have, or redirecting me to another thread maybe I've already read thru, but perhaps didn't have enough context or knowledge to understand.