PC Review


Reply
Thread Tools Rate Thread

Date file created

 
 
Les Stout
Guest
Posts: n/a
 
      16th Oct 2006
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 ***
 
Reply With Quote
 
 
 
 
WhytheQ
Guest
Posts: n/a
 
      16th Oct 2006
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 ***


 
Reply With Quote
 
Bob Phillips
Guest
Posts: n/a
 
      16th Oct 2006

'-----------------------------------------------------------------
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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 ***



 
Reply With Quote
 
Les Stout
Guest
Posts: n/a
 
      16th Oct 2006
Thank you both very much, i will try it out..

Les Stout

*** Sent via Developersdex http://www.developersdex.com ***
 
Reply With Quote
 
Les Stout
Guest
Posts: n/a
 
      16th Oct 2006
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 With Quote
 
Les Stout
Guest
Posts: n/a
 
      16th Oct 2006
Hi Bob, sorry blonde moment... Have sorted it out thanks..

Les Stout

*** Sent via Developersdex http://www.developersdex.com ***
 
Reply With Quote
 
Bob Phillips
Guest
Posts: n/a
 
      16th Oct 2006
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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 With Quote
 
=?Utf-8?B?VG9tIE9naWx2eQ==?=
Guest
Posts: n/a
 
      16th Oct 2006
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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Output Date Created and Date Modified to a txt file using a batch file mhel_0414 Windows XP 0 12th Sep 2009 07:00 AM
File to import is systematically created with date as file name. Steve in MN Microsoft Access External Data 3 18th Dec 2008 05:57 PM
Definitions of created, modified and date created in file properti =?Utf-8?B?Wm9kZHk=?= Windows XP General 0 22nd May 2006 08:31 PM
How to get the file created date in VBA? =?Utf-8?B?QW1pdA==?= Microsoft Access Form Coding 5 14th Jul 2005 08:56 PM
Date File Created Dwight Microsoft Access VBA Modules 1 31st Mar 2004 10:22 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:19 AM.