Modification Date

C

ChrisAMEC

Hey people. Is there any way to insert the file modification date into a cell
or a header/footer in Excel 2002?
 
L

Leith Ross

Hey people. Is there any way to insert the file modification date into a cell
or a header/footer in Excel 2002?

Hello Chris,

Just change the the variable FIlename to a string that includes the
file path and name of the file you want the Last Modified date for.
Then assign the variable LastModified to a cell, header, footer, etc.

Dim FSO As Object
Dim LastModified
Filename="c:\Program Files\Test.xls"
Set FSO = CreateObject("Scripting.FileSystemObject")
LastModified = FSO.GetFile(filename)

Sincerely,
Leith Ross
 
C

ChrisAMEC

Thank's so much.

Leith Ross said:
Hello Chris,

Just change the the variable FIlename to a string that includes the
file path and name of the file you want the Last Modified date for.
Then assign the variable LastModified to a cell, header, footer, etc.

Dim FSO As Object
Dim LastModified
Filename="c:\Program Files\Test.xls"
Set FSO = CreateObject("Scripting.FileSystemObject")
LastModified = FSO.GetFile(filename)

Sincerely,
Leith Ross
 
Top