ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Modification Date (https://www.excelbanter.com/excel-discussion-misc-queries/151040-modification-date.html)

ChrisAMEC

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

Leith Ross[_2_]

Modification Date
 
On Jul 20, 8:38 am, ChrisAMEC
wrote:
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


ChrisAMEC

Modification Date
 
Thank's so much.

"Leith Ross" wrote:

On Jul 20, 8:38 am, ChrisAMEC
wrote:
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




All times are GMT +1. The time now is 05:03 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com