Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Help. Can someone please help me come up with the VBA code to obtain an imported files modified date &: (1) Place it in cell A1? & (2) Put it in a variable called FileDate? Thanks a million. mikeburg -- mikeburg ------------------------------------------------------------------------ mikeburg's Profile: http://www.excelforum.com/member.php...o&userid=24581 View this thread: http://www.excelforum.com/showthread...hreadid=502519 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
This gets Date Modified for a given file. HTH Sub DateStamp() Dim FileData As Date Path = "C:\Documents and Settings\User\My Documents\My Excel\" MyStamp = FileDateTime(Path & "book1.xls") Range("a1") = MyStamp Filedate = MyStamp End Sub "mikeburg" wrote: Help. Can someone please help me come up with the VBA code to obtain an imported files modified date &: (1) Place it in cell A1? & (2) Put it in a variable called FileDate? Thanks a million. mikeburg -- mikeburg ------------------------------------------------------------------------ mikeburg's Profile: http://www.excelforum.com/member.php...o&userid=24581 View this thread: http://www.excelforum.com/showthread...hreadid=502519 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() if you create a function such as Function fLastModified(ByVal strFileName As String) As Variant Dim v As Variant On Error GoTo AnError v = FileDateTime(strFileName) fLastModified = v GoTo TheEnd AnError: fLastModified = Err.Description TheEnd: End Function then you can refernce it either direct from the worksheet or in code -- tony ----------------------------------------------------------------------- tony h's Profile: http://www.excelforum.com/member.php...fo&userid=2107 View this thread: http://www.excelforum.com/showthread.php?threadid=50251 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Date Modified File Organization | Excel Discussion (Misc queries) | |||
Date modified changes when file not saved | Excel Discussion (Misc queries) | |||
Last modified date of a linked file | Excel Discussion (Misc queries) | |||
date file modified | Excel Discussion (Misc queries) | |||
insert the date the file was last modified | Excel Discussion (Misc queries) |