Re: Showing date of last Revision

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Ron de Bruin (rondebruin_at_kabelfoon.nl)
Date: 03/02/04


Date: Tue, 2 Mar 2004 22:09:33 +0100

Hi John

You can use this event in the Thisworkbook module
This will run when you print a ***(s) in your workbook

Private Sub Workbook_BeforePrint(Cancel As Boolean)
    Dim wkSht As Work***
    For Each wkSht In ThisWorkbook.Worksheets
        wkSht.PageSetup.RightFooter = "&8Last Saved : " & _
            ActiveWorkbook.BuiltinDocumentProperties("Last Save Time")
    Next wkSht
End Sub

-- 
Regards Ron de Bruin
(Win XP Pro SP-1  XL2000-2003)
www.rondebruin.nl
"JohnB" <anonymous@discussions.microsoft.com> wrote in message news:761D6A09-D717-4F99-AD17-74D11154CC04@microsoft.com...
> Would it be possible to use this in a page header/footer?
>
> John Baldauf
>      ----- Frank Kabel wrote: -----
>
>      Hi Ron
>      good point
>
>      --
>      Regards
>      Frank Kabel
>      Frankfurt, Germany
>
>      Ron de Bruin wrote:
>      > ActiveWorkbook.BuiltinDocumentProperties
>      > Is not working correct in Excel 97
>      >> Read this from Tom Ogilvy
>      >> Note that this property is not maintained in xl97.  However, if the
>      > workbook
>      > is created/used in both xl97 and later versions, then when used in
>      > the
>      > later versions and saved the property is maintained but when used in
>      > xl97
>      > and saved, the property is not altered.  The time it was last saved
>      > in the
>      > later version will be retrieved if this property is called.  If
>      > created and
>      > used exclusively in xl97, calling this property will raise an error.
>      > You
>      > can use the beforesave event to update this property in xl97 as a
>      > workaround.  Just test the version of excel and if xl97, update the
>      > property.
>      >> another option is this
>      >> Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, _
>      > Cancel As Boolean)
>      > Sheets("Sheet1").Range("a1").Value = Date
>      > End Sub
>      >> Right click on the Excel icon next to File in the menubar
>      > Choose view code
>      > Paste this event there
>      > Alt-q to go back to Excel
>      >> If you save the file the date will be placed in A1
>      >>> "Frank Kabel" <frank.kabel@freenet.de> wrote in message
>      > news:%23I8z6Uw9DHA.2656@TK2MSFTNGP11.phx.gbl...
>      >> Hi
>      >> try the following UDF:
>      >>>> Function Last_Save_Time()
>      >>     Last_Save_Time = ActiveWorkbook.BuiltinDocumentProperties("Last
>      >> save time")
>      >> End Function
>      >>>> In your cell enter
>      >> =Last_Save_Time()
>      >>>>>>>> --
>      >> Regards
>      >> Frank Kabel
>      >> Frankfurt, Germany
>      >>>> Dave McDonald wrote:
>      >>> I want to have a cell where I show the date the last
>      >>> change was made to the work*** (like a last revision
>      >>> date). I think this is pretty easy to do if you know how,
>      >>> but I don't.
>      >>>>>> Dave McDonald
>
>

Quantcast