Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
Is it possible to get a file date & time stamp info (any particular file stored on harddrive) from within VBA. How?? Thats a lot for your help James |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi:
From the vba online help: '------------------------------ Sub ShowFileInfo() Dim fs, f, s Set fs = CreateObject("Scripting.FileSystemObject") Set f = fs.GetFile("E:\Computer\Archive\Graphics\VCRPause. bmp") s = f.DateCreated MsgBox s End Sub '------------------------------- See online-help for the File Object. Regards, Sebastienm "James" wrote: Hi Is it possible to get a file date & time stamp info (any particular file stored on harddrive) from within VBA. How?? Thats a lot for your help James |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try:
Function TS() Set fso = CreateObject("Scripting.FileSystemObject") TS = fso.GetFile("c:\aa.txt").datecreated Set fso = Nothing End Function NB: Modify the function so that the fully qualified name of your file is passed in as an argument. "James" wrote: Hi Is it possible to get a file date & time stamp info (any particular file stored on harddrive) from within VBA. How?? Thats a lot for your help James |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
VBA's function:
FileDateTime(pathname) -- Regards, Tom Ogilvy "James" wrote in message ... Hi Is it possible to get a file date & time stamp info (any particular file stored on harddrive) from within VBA. How?? Thats a lot for your help James |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Tom,
Is there a similar function to retrieve the date and time a file was last modified and by whom? Thanks "Tom Ogilvy" wrote: VBA's function: FileDateTime(pathname) -- Regards, Tom Ogilvy "James" wrote in message ... Hi Is it possible to get a file date & time stamp info (any particular file stored on harddrive) from within VBA. How?? Thats a lot for your help James |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If you mean any file:
See Ivan Moala's page http://www.xcelfiles.com/Shell32_01.html http://www.xcelfiles.com/Shell32_02.html -- Regards, Tom Ogilvy "quartz" wrote in message ... Tom, Is there a similar function to retrieve the date and time a file was last modified and by whom? Thanks "Tom Ogilvy" wrote: VBA's function: FileDateTime(pathname) -- Regards, Tom Ogilvy "James" wrote in message ... Hi Is it possible to get a file date & time stamp info (any particular file stored on harddrive) from within VBA. How?? Thats a lot for your help James |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Time date stamp | Excel Worksheet Functions | |||
Date-Time Stamp | Excel Discussion (Misc queries) | |||
date/time stamp | Excel Worksheet Functions | |||
Date time stamp | Excel Programming | |||
Date time stamp | Excel Programming |