Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Date file created
Good day all, i need to get the date a file was created, is this
possible ? All i can find is date last modified.. Any help with code would be appreciated Les Stout *** Sent via Developersdex http://www.developersdex.com *** |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Date file created
I see something by Tom that should help
Sub AAACCC() Dim fso As Object Dim f As Object Set fso = CreateObject("Scripting.FileSystemObject") Set f = fso.Drives("A").RootFolder.Files("aa_Userform.xls" ) Debug.Print f.Name Debug.Print "Created: " & f.DateCreated Debug.Print "Last Accessed: " & f.DateLastAccessed Debug.Print "Last Modified: " & f.DateLastModified End Sub Rgds J Les Stout wrote: Good day all, i need to get the date a file was created, is this possible ? All i can find is date last modified.. Any help with code would be appreciated Les Stout *** Sent via Developersdex http://www.developersdex.com *** |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Date file created
'----------------------------------------------------------------- Function DocProps(prop As String) '----------------------------------------------------------------- Application.Volatile On Error GoTo err_value DocProps = ActiveWorkbook.BuiltinDocumentProperties _ (prop) Exit Function err_value: DocProps = CVErr(xlErrValue) End Function and enter in a cell such as =DocProps ("last author") or =DocProps ("creation date") -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Les Stout" wrote in message ... Good day all, i need to get the date a file was created, is this possible ? All i can find is date last modified.. Any help with code would be appreciated Les Stout *** Sent via Developersdex http://www.developersdex.com *** |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Date file created
Thank you both very much, i will try it out..
Les Stout *** Sent via Developersdex http://www.developersdex.com *** |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Date file created
Hi Bob, please excuse the ignorance, but how do i call the function or
get it to give me what i need... Les Stout *** Sent via Developersdex http://www.developersdex.com *** |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Date file created
Hi Bob, sorry blonde moment... Have sorted it out thanks..
Les Stout *** Sent via Developersdex http://www.developersdex.com *** |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Date file created
Les,
You can call it from a worksheet =DocProps ("creation date") or within other code madeDate = DocProps ("creation date") -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Les Stout" wrote in message ... Hi Bob, please excuse the ignorance, but how do i call the function or get it to give me what i need... Les Stout *** Sent via Developersdex http://www.developersdex.com *** |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
Date file created
As Bob said, in a cell:
=DocProps ("creation date") from VBA dim v as Variant v = DocProps("creation date") if iserror(v) then msgbox "Problems" else msgbox "Results are " & v End if -- Regards, Tom Ogilvy "Les Stout" wrote: Hi Bob, please excuse the ignorance, but how do i call the function or get it to give me what i need... Les Stout *** Sent via Developersdex http://www.developersdex.com *** |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel 2003 file/properties to view created date/time how in 2007? | Excel Discussion (Misc queries) | |||
How do I find date a data file in Outlook has been created? | Excel Discussion (Misc queries) | |||
Getting at Windows File Created date with VBA | Excel Programming | |||
Saving multi-tab excel file created from comma delimited text file | Excel Programming | |||
Change File DATE created & modified | Excel Programming |