I need to have a field on a worksheet to show the file creation date. It
can't be in the header or footer as I need to make calculations based on it.
Any clues?
Regards,
Eddie
'-----------------------------------------------------------------
Function DocProps(prop As String)
'-----------------------------------------------------------------
Application.Volatile
On Error GoTo err_value
DocProps = ActiveWorkbook.BuiltinDocument*Properties _
(prop)
Exit Function
err_value:
DocProps = CVErr(xlErrValue)
End Functionand enter in a cell such as
=DocProps (quot;last save timequot;)--
HTH
Bob Phillips
(remove nothere from email address if mailing direct)
quot;Eddie Armstrongquot; lt;Eddie gt; wrote in
message ...
gt; I need to have a field on a worksheet to show the file creation date. It
gt; can't be in the header or footer as I need to make calculations based on
it.
gt; Any clues?
gt;
gt; Regards,
gt; Eddie
Hi Eddie
Does this help......
Insert a static date or time
Current date Select a cell and press CTRL ;
Current time Select a cell and press CTRL SHIFT ;
Current date and time Select a cell and press CTRL ; then SPACE then
CTRL SHIFT ;
Louise
quot;Eddie Armstrongquot; wrote:
gt; I need to have a field on a worksheet to show the file creation date. It
gt; can't be in the header or footer as I need to make calculations based on it.
gt; Any clues?
gt;
gt; Regards,
gt; Eddie
This line of code in an appropriate macro will do it............
Range(quot;b1quot;) = ActiveWorkbook.BuiltinDocumentProperties(quot;Creation Datequot;)
Vaya con Dios,
Chuck, CABGx3
quot;Eddie Armstrongquot; wrote:
gt; I need to have a field on a worksheet to show the file creation date. It
gt; can't be in the header or footer as I need to make calculations based on it.
gt; Any clues?
gt;
gt; Regards,
gt; Eddie
The creation date is part of the workbook's builtin document properties and
can be accessed via VBA
thisworkbook.BuiltinDocumentProperties(quot;Creation Datequot;)
quot;Eddie Armstrongquot; wrote:
gt; I need to have a field on a worksheet to show the file creation date. It
gt; can't be in the header or footer as I need to make calculations based on it.
gt; Any clues?
gt;
gt; Regards,
gt; Eddie
Should be........
=DocProps(quot;creation datequot;)
or use this UDF, although I prefer Bob's because it is not specific to one
property.
Function CreaDate() As Date
CreaDate = ActiveWorkbook.BuiltinDocumentProperties(quot;Creation Datequot;)
End FunctionGord Dibben Excel MVPOn Wed, 14 Dec 2005 16:35:13 -0000, quot;Bob Phillipsquot;
gt; wrote:
gt;
gt;'-----------------------------------------------------------------
gt;Function DocProps(prop As String)
gt;'-----------------------------------------------------------------
gt; Application.Volatile
gt; On Error GoTo err_value
gt; DocProps = ActiveWorkbook.BuiltinDocument*Properties _
gt; (prop)
gt; Exit Function
gt;err_value:
gt; DocProps = CVErr(xlErrValue)
gt;End Function
gt;
gt;
gt;and enter in a cell such as
gt;=DocProps (quot;last save timequot;)
Thanks Gord, force of habit as most ask for last saved.
--
HTH
Bob Phillips
(remove nothere from email address if mailing direct)
quot;Gord Dibbenquot; lt;gorddibbATshawDOTcagt; wrote in message
...
gt; Should be........
gt;
gt; =DocProps(quot;creation datequot;)
gt;
gt; or use this UDF, although I prefer Bob's because it is not specific to one
gt; property.
gt;
gt; Function CreaDate() As Date
gt; CreaDate = ActiveWorkbook.BuiltinDocumentProperties(quot;Creation Datequot;)
gt; End Function
gt;
gt;
gt; Gord Dibben Excel MVP
gt;
gt;
gt; On Wed, 14 Dec 2005 16:35:13 -0000, quot;Bob Phillipsquot;
gt; gt; wrote:
gt;
gt; gt;
gt; gt;'-----------------------------------------------------------------
gt; gt;Function DocProps(prop As String)
gt; gt;'-----------------------------------------------------------------
gt; gt; Application.Volatile
gt; gt; On Error GoTo err_value
gt; gt; DocProps = ActiveWorkbook.BuiltinDocument*Properties _
gt; gt; (prop)
gt; gt; Exit Function
gt; gt;err_value:
gt; gt; DocProps = CVErr(xlErrValue)
gt; gt;End Function
gt; gt;
gt; gt;
gt; gt;and enter in a cell such as
gt; gt;=DocProps (quot;last save timequot;)
Creation Date gets very little call.Gord
On Wed, 14 Dec 2005 19:26:08 -0000, quot;Bob Phillipsquot;
gt; wrote:
gt;Thanks Gord, force of habit as most ask for last saved.
- Sep 23 Tue 2008 20:46
How do I show file creation date in a cell in Excel?
close
全站熱搜
留言列表
發表留言
留言列表

