Loading
Ozgrid Excel Help & Best Practices Forums

Excel Video Tutorials / Excel Dashboards Reports



Results 1 to 5 of 5

Thread: Display Last Update Date & Time

  1. #1
    Join Date
    10th March 2006
    Posts
    37

    Display Last Update Date & Time

    Hi all

    I want to display on a spreadsheet, "last update date & time"; Is there a function to do it??

    Many thanks in advance
    Moony

    Excel Video Tutorials / Excel Dashboards Reports


  2. #2
    Join Date
    15th August 2005
    Location
    Mechelen, Belgium
    Posts
    6,063

    Re: Last Upadate

    Hi

    put this in a cell, say A1:

    last update date & time

    Then, add this bit of code:

    VB:
    Private Sub Workbook_BeforeClose(Cancel As Boolean) 
        Dim iResponse As Integer 
        iResponse = MsgBox("Do you want to update cell B1 with the current date and time?", vbQuestion + vbYesNoCancel, "Update") 
        If iResponse = vbYes Then Range("B1").Value = Now 
    End Sub 
    
    
    Wigi
    Regards,

    Wigi

    Excel MVP 2011-2014



    For more Excel memes: visit http://www.wimgielis.be ==> English articles ==> Excel memes

    -- Topics without [CODE] tags or a meaningful topic title, will be neglected by me (and probably many others as well) --

  3. #3
    Join Date
    10th March 2006
    Posts
    37

    Re: Last Upadate

    Many thanks for your prompt reply
    But actually I'm kind of new to excel vba, so would please mind showing me where exactly to put this code and how to get there??

    Many thanks again.
    Moony

    Excel Video Tutorials / Excel Dashboards Reports


  4. #4
    Join Date
    15th August 2005
    Location
    Mechelen, Belgium
    Posts
    6,063

    Re: Last Upadate

    Moony

    If you fill in your "assumed experience" in your profile, you probably get more or less detailed information.

    - Hit Alt-F11, you're now in the VBA environment.
    - Locate your file in VBA project
    - Dubble left click on that file name
    - Locate "ThisWorkbook" in your current file
    - Paste the code in the white window
    - Return to Excel with again Alt-F11

    Do you succeed?

    Wigi
    Regards,

    Wigi

    Excel MVP 2011-2014



    For more Excel memes: visit http://www.wimgielis.be ==> English articles ==> Excel memes

    -- Topics without [CODE] tags or a meaningful topic title, will be neglected by me (and probably many others as well) --

  5. #5
    Join Date
    2nd November 2005
    Location
    Wessex
    Posts
    1,267

    Re: Last Upadate

    You can get it from the workbook proeprties.

    VB:
     
     '-----------------------------------------------------------------
    Function DocProps(prop As String) 
         '-----------------------------------------------------------------
        Application.Volatile 
        On Error Goto err_value 
        DocProps = ActiveWorkbook.BuiltinDocumentProperties _ 
        (prop) 
        Exit Function 
    err_value: 
        DocProps = CVErr(xlErrValue) 
    End Function 
    
    
    and enter in a cell such as
    =DocProps ("Last Save Time")
    and format as required
    HTH

    Bob

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Possible Answers

  1. XL: How to Display the Current Date and Time with Text
    By Dave Hawley in forum Excel Formulas (No Questions)
    Replies: 0
    Last Post: April 27th, 2008, 22:14
  2. XL: How to Display the Current Date and Time with Text
    By Dave Hawley in forum Excel Formulas (No Questions)
    Replies: 0
    Last Post: April 27th, 2008, 22:13
  3. XL: How to Display the Current Date and Time with Text
    By Dave Hawley in forum Excel Formulas (No Questions)
    Replies: 0
    Last Post: April 27th, 2008, 22:12
  4. XL: How to Display the Current Date and Time with Text
    By Dave Hawley in forum Excel Formulas (No Questions)
    Replies: 0
    Last Post: April 27th, 2008, 22:11
  5. Display Date/Time In English
    By jonny in forum EXCEL HELP
    Replies: 11
    Last Post: October 20th, 2006, 10:27

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
porno