Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I need to place the last update date of a data file that I use to extract
data to a different file. I need the formula to place this date in a cell at the top of my working file. Thanks |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Here is the general idea:
Sub NeedADate() Dim FSO As Scripting.FileSystemObject Dim FileItem As Scripting.File Set FSO = New Scripting.FileSystemObject filespec = "C:\test\tulip.jpg" Set FileItem = FSO.GetFile(filespec) MsgBox (FileItem.DateLastModified) End Sub You must include a reference to Microsoft Scripting Runtime You would use your real data file in place of the .jpg and to store the date, something like: Range("A1").Value=FileItem.DateLastModified -- Gary''s Student - gsnu200828 "Dennis" wrote: I need to place the last update date of a data file that I use to extract data to a different file. I need the formula to place this date in a cell at the top of my working file. Thanks |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You can use VB's FileTimeDate function to do that directly (without needing
any additional references)... MsgBox FileDateTime("C:\test\tulip.jpg") -- Rick (MVP - Excel) "Gary''s Student" wrote in message ... Here is the general idea: Sub NeedADate() Dim FSO As Scripting.FileSystemObject Dim FileItem As Scripting.File Set FSO = New Scripting.FileSystemObject filespec = "C:\test\tulip.jpg" Set FileItem = FSO.GetFile(filespec) MsgBox (FileItem.DateLastModified) End Sub You must include a reference to Microsoft Scripting Runtime You would use your real data file in place of the .jpg and to store the date, something like: Range("A1").Value=FileItem.DateLastModified -- Gary''s Student - gsnu200828 "Dennis" wrote: I need to place the last update date of a data file that I use to extract data to a different file. I need the formula to place this date in a cell at the top of my working file. Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
want to record date for each time I update a file - Excel 2007 | Excel Discussion (Misc queries) | |||
want to record date for each time I update a file | Excel Discussion (Misc queries) | |||
i want to update one excel file the other one update automaticaly | New Users to Excel | |||
How to prevent file date change when no update made in Excel? | Excel Discussion (Misc queries) | |||
Date last update for the file | Excel Discussion (Misc queries) |