Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 396
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 246
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 396
Default Date file created

Thank you both very much, i will try it out..

Les Stout

*** Sent via Developersdex http://www.developersdex.com ***
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 396
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 396
Default Date file created

Hi Bob, sorry blonde moment... Have sorted it out thanks..

Les Stout

*** Sent via Developersdex http://www.developersdex.com ***
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2003 file/properties to view created date/time how in 2007? Bald Eagle Boy Excel Discussion (Misc queries) 2 June 27th 12 09:11 PM
How do I find date a data file in Outlook has been created? dcoville Excel Discussion (Misc queries) 0 July 1st 09 05:14 PM
Getting at Windows File Created date with VBA Neal Zimm Excel Programming 5 September 25th 06 03:08 PM
Saving multi-tab excel file created from comma delimited text file Marcus Aurelius Excel Programming 2 December 19th 05 05:16 PM
Change File DATE created & modified Don Guillett[_4_] Excel Programming 3 April 26th 05 09:38 PM


All times are GMT +1. The time now is 09:57 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"