Thread: Date created
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Stephen[_6_] Stephen[_6_] is offline
external usenet poster
 
Posts: 9
Default 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