Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 2 of 2

Thread: Trying to show the date a sheet was last refreshed.

  1. #1
    New Member
    Join Date
    Apr 2002
    Location
    Adam
    Posts
    9
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I found code that will work for a pivot table returning the date to a message box but I can't figure out how do this so the date is in a cell and the instead of a Pivot refresh date I need a sheet refresh date.Please Help
    Thanks

    Set pvtTable = Worksheets("Sheet1").Range("A3").PivotTable
    dateString = Format(pvtTable.RefreshDate, "Long Date")
    MsgBox "The data was last refreshed on " & dateString

  2. #2
    Board Regular
    Join Date
    Mar 2002
    Location
    Brampton
    Posts
    328
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Use the change event for that particular sheet and set a cell value to Date:

    Private Sub Worksheet_Change(ByVal Target As Range)
    Cells(1, 1) = Date
    End Sub

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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