+ Reply to Thread
Results 1 to 3 of 3

Thread: Display time of last refresh of a Query?

  1. #1
    Registered User
    Join Date
    08-17-2009
    Location
    US
    MS-Off Ver
    Excel 2007
    Posts
    19

    Display time of last refresh of a Query?

    How do I show the time of the lastest MS Query refresh?
    Last edited by Dave H; 01-05-2012 at 10:04 AM.

  2. #2
    Registered User
    Join Date
    08-04-2011
    Location
    Tampa, FL
    MS-Off Ver
    Excel 2007
    Posts
    84

    Re: Display time of last refresh of a Query?

    VBA solution:
    Sub RefreshAll()
    '
    ' RefreshAll Macro
    '
    
    '
    Application.ScreenUpdating = False
    Application.StatusBar = "Refreshing......."
       ActiveWorkbook.RefreshAll
        With Range("a1")
         .NumberFormat = "mm/dd/yyyy h:mm:ss AM/PM"
         .Value = Now()
        End With
    Application.StatusBar = "Ready"
    Application.ScreenUpdating = True
    End Sub
    Steps:
    1. Alt-F11 to display VBA editor
    2. Right-click -> Insert -> Module
    3. Copy/paste code
    4. Will have to save-as macro enabled workbook if not already
    5. Timestamp will appear in cell A1, so you need to change this if you want it somewhere else
    6. You can assign to a button or run macro manually

  3. #3
    Registered User
    Join Date
    08-17-2009
    Location
    US
    MS-Off Ver
    Excel 2007
    Posts
    19

    Re: Display time of last refresh of a Query?

    Thanks for the help!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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

Search Engine Friendly URLs by vBSEO 3.2.0