Refresh Excel Pivot Tables at Set Date/Time

hallcr

New Member
Joined
Sep 13, 2013
Messages
1
Hi All,

I am working on an excel project where I have multiple pivot tables in a report attached to an external source cube of data. The pivot tables in the workbook take about 45-60 minutes (blocking the usage of other excel sheets) to go through a total refresh of the data given the level of data that is available. I would like to be able to come in on Monday morning with the complete report having already been refreshed and ready to go. I have been scouring the web for ways to make this happen and have gotten pretty far but have hit a road block and need some help...

Below is the string of VBA text I have entered into the ThisWorkbook portion of "VBAProject" (to run at 8AM on Monday):

Private Sub Workbook_Open()
If Weekday(Date, 2) = 1 Then
Application.OnTime TimeValue("08:00:00"), "RefreshMacro"
End If
End Sub



Also, below is the string of VBA I have entered into a normal module within the "VBAProject" (to refresh all pivot tables in the workbook):

Sub RefreshMacro()
' RefreshMacro Macro
ActiveWorkbook.RefreshAll
End Sub

My understanding is that this should refresh all of the pivot tables in the entire workbook at 8AM on Monday. I have been successful with getting the report to run for a specific time on the current day (computer is awake and worksheet is open), however I have been unsuccessful with an over the weekend refresh (worksheet is open but computer is asleep).

My questions are:
-Does the workbook need to be open on the screen in order for the workbook to refresh?
-Will the workbook still refresh if the computer is asleep? (computers auto-lock after 15 minutes of inactivity)
-Would there be a better way I could accomplish this objective? Would save me a lot of time on Monday mornings waiting for the report to refresh...

Please let me know your thoughts! I appreciate any advice you can offer.

Thanks so much,
Chris
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December

Forum statistics

Threads
1,223,911
Messages
6,175,324
Members
452,635
Latest member
laura12345

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top