Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel 2002: Show File Creation Date 2

Status
Not open for further replies.

jcmv007

Technical User
Nov 1, 2001
88
US
Using: Windows XP SP1, MS-EXCEL 2002 SP1

How do I show the current file or active file's creation date. Can this be made into a function a user calls so the information is place in a cell specified by the user.

I have found the following code but do not how to get it to show in the SHEET.
Code:
Sub ShowFileInfo(filespec)
    Dim fs, f, s
    Set fs = CreateObject("Scripting.FileSystemObject")
    Set f = fs.GetFile(filespec)
    s = f.DateCreated
    MsgBox s
End Sub

Thanks,


James
 
Hi James
Dunno about XP but this certainly works in xl2k

Code:
ThisWorkbook.BuiltinDocumentProperties("Creation Date")

Hope this helps
Happy Friday
;-)

If a man says something and there are no women there to hear him, is he still wrong? [ponder]
The faqs ma'am, just the faqs. Get the best from these forums : faq222-2244
 
Loomah

Thanks it worked great! And have a star.


James :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top