PC Review


Reply
Thread Tools Rate Thread

display pivot refresh date?

 
 
Cam
Guest
Posts: n/a
 
      17th Mar 2009
Hello,

I have an Excel file with several pivot tables in different worksheets that
I would like automate the following:
1) When the pivot tables are refreshed, it shows the date/time stamp they
were refreshed on each sheet.
2) I created a scheduler task to open the file, but need to automate it to
run the refresh all macro when it is opened once only every morning Mon to
Frid at 7AM.

I created a refresh all macro to refresh all pivot table. Thanks
 
Reply With Quote
 
 
 
 
Barb Reinhardt
Guest
Posts: n/a
 
      17th Mar 2009
In your refresh macro, you could add (or update) a named range/constant in
the workbook to reflect the Refresh Date/Time and then display that somewhere
on the pivot sheet. Of course, this wouldn't catch a change if someone
manually refreshed it.

"Cam" wrote:

> Hello,
>
> I have an Excel file with several pivot tables in different worksheets that
> I would like automate the following:
> 1) When the pivot tables are refreshed, it shows the date/time stamp they
> were refreshed on each sheet.
> 2) I created a scheduler task to open the file, but need to automate it to
> run the refresh all macro when it is opened once only every morning Mon to
> Frid at 7AM.
>
> I created a refresh all macro to refresh all pivot table. Thanks

 
Reply With Quote
 
eric_powell
Guest
Posts: n/a
 
      5th Jun 2009
Try using the pivot table's refreshDate property. The trick is in retrieving
the updated refreshDate when it is refeshed. Unfortunately, there are no
pivot table events (that I know of), but you can use the change event of the
respective worksheet . Your change event could call a sub like the one
below, and place the value in a nearby cell rather than a msgbox.

Sub refreshDate()
Set pvtTable = Worksheets("Yearly").PivotTables("Yearly")
dateString = Format(pvtTable.refreshDate, "Long Date")
MsgBox "The data was last refreshed on " & dateString
End Sub


"Cam" wrote:

> Hello,
>
> I have an Excel file with several pivot tables in different worksheets that
> I would like automate the following:
> 1) When the pivot tables are refreshed, it shows the date/time stamp they
> were refreshed on each sheet.
> 2) I created a scheduler task to open the file, but need to automate it to
> run the refresh all macro when it is opened once only every morning Mon to
> Frid at 7AM.
>
> I created a refresh all macro to refresh all pivot table. Thanks

 
Reply With Quote
 
Patrick Molloy
Guest
Posts: n/a
 
      8th Jun 2009
but if you refresh the pivot table this event gets fired:

Private Sub Worksheet_PivotTableUpdate(ByVal Target As PivotTable)

so all one would need to do is add a line like
Range("A1")="Refreshed at " & now()


"eric_powell" <(E-Mail Removed)> wrote in message
news:4B38A98C-AD41-4A38-B0DF-(E-Mail Removed)...
> Try using the pivot table's refreshDate property. The trick is in
> retrieving
> the updated refreshDate when it is refeshed. Unfortunately, there are no
> pivot table events (that I know of), but you can use the change event of
> the
> respective worksheet . Your change event could call a sub like the one
> below, and place the value in a nearby cell rather than a msgbox.
>
> Sub refreshDate()
> Set pvtTable = Worksheets("Yearly").PivotTables("Yearly")
> dateString = Format(pvtTable.refreshDate, "Long Date")
> MsgBox "The data was last refreshed on " & dateString
> End Sub
>
>
> "Cam" wrote:
>
>> Hello,
>>
>> I have an Excel file with several pivot tables in different worksheets
>> that
>> I would like automate the following:
>> 1) When the pivot tables are refreshed, it shows the date/time stamp they
>> were refreshed on each sheet.
>> 2) I created a scheduler task to open the file, but need to automate it
>> to
>> run the refresh all macro when it is opened once only every morning Mon
>> to
>> Frid at 7AM.
>>
>> I created a refresh all macro to refresh all pivot table. Thanks


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I display data refresh date and time Shree Microsoft Excel Worksheet Functions 2 27th Oct 2009 04:23 PM
omit dialog box display during pivot table refresh (macro) cm Microsoft Excel Programming 4 17th Sep 2009 07:31 PM
Update a cell based on the pivot table refresh date syscrusher Microsoft Excel Programming 0 15th Aug 2008 07:18 PM
Last Refresh date for pivot table HRobertson Microsoft Excel Misc 2 26th Mar 2008 06:30 PM
Date in cell to update upon Pivot Table refresh chris46521 Microsoft Excel Programming 4 17th Aug 2006 11:02 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:46 PM.