![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Mar 2002
Posts: 2
|
How can i show the last time i modified a *.xls file in a cell in the worksheet
|
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Auckland, New Zealand
Posts: 4,209
|
Try this UDF...place code in a Std Module;
Function File_LastModified(FullFilePath) Dim FSO, F 'Usage:= Placed in a cell [=File_LastModified(C:ExcelFilesUseful###.xls)] 'Usage:= Placed in a cell [=File_LastModified(A1)] Set FSO = CreateObject("Scripting.FileSystemObject") Set F = FSO.GetFile(FullFilePath) File_LastModified = "Last Modified: " & F.DateLastModified End Function HTH Ivan |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|