Refresh pivot data automation

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.
 
R

ryguy7272

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---
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top