Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I want to return the File Property value of the excel file's last modified
date to a cell in a worksheet. Is this possible? I seem to recall that there may be some way of using EXCEL4 macro, but cannot remember how. Or perhaps there is an easier way. Many thanks |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
It's the FileDateTime VBA function you are looking for. You can create a
simple UDF to reach time stamp on a worksheet. Regards, Stefi €žDunc€ť ezt Ă*rta: I want to return the File Property value of the excel file's last modified date to a cell in a worksheet. Is this possible? I seem to recall that there may be some way of using EXCEL4 macro, but cannot remember how. Or perhaps there is an easier way. Many thanks |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I found the following code on Microsoft.com, which is what I think I need.
1. But how would I then reference this information in a cell? 2. Also, how would I make this code generic so the filename would be whatever the active file is? Thanks! Dim MyStamp ' Assume TESTFILE was last modified on February 12, 1993 ' at 4:35:47 PM. ' Assume English/U.S. locale settings. MyStamp = FileDateTime("TESTFILE") ' Returns "2/12/93 4:35:47 PM". "Stefi" wrote: It's the FileDateTime VBA function you are looking for. You can create a simple UDF to reach time stamp on a worksheet. Regards, Stefi €žDunc€ť ezt Ă*rta: I want to return the File Property value of the excel file's last modified date to a cell in a worksheet. Is this possible? I seem to recall that there may be some way of using EXCEL4 macro, but cannot remember how. Or perhaps there is an easier way. Many thanks |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Install this UDF in a normal module:
Function MyStamp() Application.Volatile MyStamp = FileDateTime(ThisWorkbook.FullName) End Function and use it in a cell as an UDF: = MyStamp() Works only after the active workbook has been saved as an .XLS file. Regards, Stefi €žDavid L.€ť ezt Ă*rta: I found the following code on Microsoft.com, which is what I think I need. 1. But how would I then reference this information in a cell? 2. Also, how would I make this code generic so the filename would be whatever the active file is? Thanks! Dim MyStamp ' Assume TESTFILE was last modified on February 12, 1993 ' at 4:35:47 PM. ' Assume English/U.S. locale settings. MyStamp = FileDateTime("TESTFILE") ' Returns "2/12/93 4:35:47 PM". "Stefi" wrote: It's the FileDateTime VBA function you are looking for. You can create a simple UDF to reach time stamp on a worksheet. Regards, Stefi €žDunc€ť ezt Ă*rta: I want to return the File Property value of the excel file's last modified date to a cell in a worksheet. Is this possible? I seem to recall that there may be some way of using EXCEL4 macro, but cannot remember how. Or perhaps there is an easier way. Many thanks |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hey Stefi--very cool! Thanks.
-- MikeC@Trane "Stefi" wrote: Install this UDF in a normal module: Function MyStamp() Application.Volatile MyStamp = FileDateTime(ThisWorkbook.FullName) End Function and use it in a cell as an UDF: = MyStamp() Works only after the active workbook has been saved as an .XLS file. Regards, Stefi €žDavid L.€ť ezt Ă*rta: I found the following code on Microsoft.com, which is what I think I need. 1. But how would I then reference this information in a cell? 2. Also, how would I make this code generic so the filename would be whatever the active file is? Thanks! Dim MyStamp ' Assume TESTFILE was last modified on February 12, 1993 ' at 4:35:47 PM. ' Assume English/U.S. locale settings. MyStamp = FileDateTime("TESTFILE") ' Returns "2/12/93 4:35:47 PM". "Stefi" wrote: It's the FileDateTime VBA function you are looking for. You can create a simple UDF to reach time stamp on a worksheet. Regards, Stefi €žDunc€ť ezt Ă*rta: I want to return the File Property value of the excel file's last modified date to a cell in a worksheet. Is this possible? I seem to recall that there may be some way of using EXCEL4 macro, but cannot remember how. Or perhaps there is an easier way. Many thanks |
#6
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
How can I add this to a page footer?
"MikeC@Trane" wrote: Hey Stefi--very cool! Thanks. -- MikeC@Trane "Stefi" wrote: Install this UDF in a normal module: Function MyStamp() Application.Volatile MyStamp = FileDateTime(ThisWorkbook.FullName) End Function and use it in a cell as an UDF: = MyStamp() Works only after the active workbook has been saved as an .XLS file. Regards, Stefi €žDavid L.€ť ezt Ă*rta: I found the following code on Microsoft.com, which is what I think I need. 1. But how would I then reference this information in a cell? 2. Also, how would I make this code generic so the filename would be whatever the active file is? Thanks! Dim MyStamp ' Assume TESTFILE was last modified on February 12, 1993 ' at 4:35:47 PM. ' Assume English/U.S. locale settings. MyStamp = FileDateTime("TESTFILE") ' Returns "2/12/93 4:35:47 PM". "Stefi" wrote: It's the FileDateTime VBA function you are looking for. You can create a simple UDF to reach time stamp on a worksheet. Regards, Stefi €žDunc€ť ezt Ă*rta: I want to return the File Property value of the excel file's last modified date to a cell in a worksheet. Is this possible? I seem to recall that there may be some way of using EXCEL4 macro, but cannot remember how. Or perhaps there is an easier way. Many thanks |
#7
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Stefi
I came across yor response below and tried it just as shown. Unfortunately it returns #NAME?. Do I need to add something? I assumed it would return the date without specifing the file name. Rick "Stefi" wrote: Install this UDF in a normal module: Function MyStamp() Application.Volatile MyStamp = FileDateTime(ThisWorkbook.FullName) End Function and use it in a cell as an UDF: = MyStamp() Works only after the active workbook has been saved as an .XLS file. Regards, Stefi €žDavid L.€ť ezt Ă*rta: I found the following code on Microsoft.com, which is what I think I need. 1. But how would I then reference this information in a cell? 2. Also, how would I make this code generic so the filename would be whatever the active file is? Thanks! Dim MyStamp ' Assume TESTFILE was last modified on February 12, 1993 ' at 4:35:47 PM. ' Assume English/U.S. locale settings. MyStamp = FileDateTime("TESTFILE") ' Returns "2/12/93 4:35:47 PM". "Stefi" wrote: It's the FileDateTime VBA function you are looking for. You can create a simple UDF to reach time stamp on a worksheet. Regards, Stefi €žDunc€ť ezt Ă*rta: I want to return the File Property value of the excel file's last modified date to a cell in a worksheet. Is this possible? I seem to recall that there may be some way of using EXCEL4 macro, but cannot remember how. Or perhaps there is an easier way. Many thanks |
#8
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Did you save the function where Stefi said to put it, namely, a Module? In
the VB editor, click on Insert/Module in its menu bar and copy paste the code in the code window that opens up. Now go back to the worksheet and hit F9 to force an update. -- Rick (MVP - Excel) "PSU35" wrote in message ... Stefi I came across yor response below and tried it just as shown. Unfortunately it returns #NAME?. Do I need to add something? I assumed it would return the date without specifing the file name. Rick "Stefi" wrote: Install this UDF in a normal module: Function MyStamp() Application.Volatile MyStamp = FileDateTime(ThisWorkbook.FullName) End Function and use it in a cell as an UDF: = MyStamp() Works only after the active workbook has been saved as an .XLS file. Regards, Stefi €žDavid L.€ť ezt Ă*rta: I found the following code on Microsoft.com, which is what I think I need. 1. But how would I then reference this information in a cell? 2. Also, how would I make this code generic so the filename would be whatever the active file is? Thanks! Dim MyStamp ' Assume TESTFILE was last modified on February 12, 1993 ' at 4:35:47 PM. ' Assume English/U.S. locale settings. MyStamp = FileDateTime("TESTFILE") ' Returns "2/12/93 4:35:47 PM". "Stefi" wrote: It's the FileDateTime VBA function you are looking for. You can create a simple UDF to reach time stamp on a worksheet. Regards, Stefi €žDunc€ť ezt Ă*rta: I want to return the File Property value of the excel file's last modified date to a cell in a worksheet. Is this possible? I seem to recall that there may be some way of using EXCEL4 macro, but cannot remember how. Or perhaps there is an easier way. Many thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
run a macro in a locked cell | Excel Discussion (Misc queries) | |||
Cell shading issue on EXCEL 2003 | Excel Discussion (Misc queries) | |||
Cell shading issue on EXCEL 2003 | Excel Discussion (Misc queries) | |||
Excel 2003 Word Wrap Problem within cell | Excel Discussion (Misc queries) | |||
Pasting Word table cell with paragraph markers into single Excel c | Excel Discussion (Misc queries) |