Refresh pivot data automation

  • Thread starter Thread starter Cam
  • Start date Start date
C

Cam

Hello,

I have an excel file with several pivot sheets (from source Access query)
that I need to refresh the data once a day every 6:30AM. I was able to create
a scheduler task in Windows XP to open the file at 6:30AM every morning, but
I need to run the refresh all macro in the excel file instead. How do I
program in VBA or how to do what I want? Thanks

Also, I want in the sheets to show date/time stamp of when the data was
refresh. Don't know how.
 
For Refresh all Pivot Tables in a Worksheet, see this:
http://www.ozgrid.com/VBA/pivot-table-refresh.htm

Now, for the time stamp, just do something like this:
Sub Macro1()
Range("J1").Select
ActiveCell.FormulaR1C1 = "=NOW()"
Range("J1").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
End Sub

Well, you get the idea.

HTH,
Ryan---
 
Back
Top