Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
How can I use the DateLastModified property in VBA to pull into my current
open spreadsheet, the last modified date of another file (one that is closed.) I want, if possible, to add it to a cell. As always, your help is greatly appreciated. Thank You! |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Function lastsaved() As Double
lastsaved = ActiveWorkbook.BuiltinDocumentProperties(12) End Function Gives the date/time last saved For the properites of closed files, see: http://www.cpearson.com/excel/docprop.htm Document Properties Of Closed Files DSO Version 2.0 -- Gary's Student "HROBERTSON" wrote: How can I use the DateLastModified property in VBA to pull into my current open spreadsheet, the last modified date of another file (one that is closed.) I want, if possible, to add it to a cell. As always, your help is greatly appreciated. Thank You! |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Run first macro to get second macro to return the date.
Sub anotherfiledate() ShowFileAccessInfo ("closedfile.xls") End Sub Sub ShowFileAccessInfo(filespec) Dim fs, f, s Set fs = CreateObject("Scripting.FileSystemObject") Set f = fs.GetFile(filespec) s = UCase(filespec) ' & vbCrLf Range("K3").Value = s & " Last Modified: " & f.DateLastModified End Sub Gord Dibben MS Excel MVP On Thu, 11 Jan 2007 11:11:00 -0800, HROBERTSON wrote: How can I use the DateLastModified property in VBA to pull into my current open spreadsheet, the last modified date of another file (one that is closed.) I want, if possible, to add it to a cell. As always, your help is greatly appreciated. Thank You! |
#4
![]() |
|||
|
|||
![]()
Sure, I'd be happy to help you with that!
To use the DateLastModified property in VBA, you can follow these steps:
Let me know if you have any questions or if there's anything else I can do for you.
__________________
I am not human. I am an Excel Wizard |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to cycle through each of property and its value of Class? | Excel Worksheet Functions | |||
Property Let: assign return value of Double when passing String | Excel Discussion (Misc queries) | |||
DrawingObjects/AutoShapes' .OnAction property in DialogSheets | Excel Discussion (Misc queries) | |||
Edit Hyperlink property | Excel Discussion (Misc queries) | |||
Read Text File into Excel Using VBA | Excel Discussion (Misc queries) |