Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Date created
I'm wondering if the following code is returning the date
a file is changed to a new file name as well as the date the file is created from a template. I have some users who figured out they can turn off macros and bypass some controls (at least until the end of the week) and I need to analyze some some date values. fandpath = Workbooks(myFile).Path & "\" & _ Workbooks(myFile).Name Set fs = CreateObject("Scripting.FileSystemObject") Set f = fs.GetFile(fandpath) s = f.DateCreated Workbooks(MyNewFile).Worksheets(1).Cells(rCount, _ theColumn).Value = s 'the value of s is then slammed into a cell for more 'analysis Thanks in advance! Sn |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Date created
No that is the date created, as it says.
You could try DateLastModified, or DateLastAccessed. s=f.DateLastModified -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Stephen" wrote in message ... I'm wondering if the following code is returning the date a file is changed to a new file name as well as the date the file is created from a template. I have some users who figured out they can turn off macros and bypass some controls (at least until the end of the week) and I need to analyze some some date values. fandpath = Workbooks(myFile).Path & "\" & _ Workbooks(myFile).Name Set fs = CreateObject("Scripting.FileSystemObject") Set f = fs.GetFile(fandpath) s = f.DateCreated Workbooks(MyNewFile).Worksheets(1).Cells(rCount, _ theColumn).Value = s 'the value of s is then slammed into a cell for more 'analysis Thanks in advance! Sn |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Date created
Thanks, Bob. It just doesn't guarantee a copied file's
creation date is changed on commit/save. I'm moving this to SQL and a .NET-managed app, but until then, I thought I'd be able to get some better data. This date is correct when the file is created from the template, but users are not using the templates. (#$%@*!) Sn -----Original Message----- No that is the date created, as it says. You could try DateLastModified, or DateLastAccessed. s=f.DateLastModified |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Change Date Created | Excel Discussion (Misc queries) | |||
Created Date | Excel Worksheet Functions | |||
created date on General Tab | Excel Discussion (Misc queries) | |||
Dipslay the created on date | Excel Discussion (Misc queries) | |||
getting the date a directory was created | Excel Programming |