Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Cam Cam is offline
external usenet poster
 
Posts: 165
Default Refresh pivot data automation

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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,836
Default Refresh pivot data automation

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

"Cam" wrote:

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.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Code that will rerun or refresh a pivot table (after new data ispasted into the original Pivot Table's Source Range) Mike C[_5_] Excel Programming 3 February 15th 08 06:22 AM
Create refresh button in worksheet to refresh Pivot Table Data Ron Excel Worksheet Functions 1 October 13th 07 01:20 AM
how to refresh pivot data zobernjik Excel Discussion (Misc queries) 1 December 6th 05 12:18 PM
Pivot table Data refresh SSD1 Excel Worksheet Functions 2 June 17th 05 09:13 PM
Pivot Table REFRESH Flaw -- Saves Old Data in Selection Area AFTER REFRESH Ken Roberts Excel Programming 3 September 11th 03 06:02 AM


All times are GMT +1. The time now is 10:19 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"