+ Reply to Thread
Results 1 to 3 of 3

Auto-Refresh Pivot Table When Source Data Refreshes

  1. #1
    Registered User
    Join Date
    10-05-2012
    Location
    Minneapolis, Minnesota
    MS-Off Ver
    Excel 2010
    Posts
    2

    Auto-Refresh Pivot Table When Source Data Refreshes

    Hi Folks,

    I've been working with Excel and VBA for some time now, but this is my first post. I have an Excel 2013 Workbook with two Worksheets. WS1 contains a table that is linked via MySQL ODBC. This table is set to refresh every 5 minutes. WS2 contains a pivot table that pulls selected data from the table in WS1 and drives a dashboard. Currently, I'm using an Event "Activate" procedure in WS2 to refresh the pivot table. However, I'd like the pivot table to refresh automatically every time the table data WS1 is refreshed. I've tried replacing the Activate procedure with a "Change" procedure, but just can't seem to get the pivot data to refresh. Any assistance/suggestions would be greatly appreciated.
    Last edited by XLINT; 10-30-2015 at 05:10 PM.

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Auto-Refresh Pivot Table When Source Data Refreshes

    Hi XLINT and welcome to the forum,

    I assume you have your Activate code behind the worksheet (WS2) and not in a module. If you do, it will fire (refresh the PT) when you select the worksheet WS2 from another worksheet. If you have the code behind a Change Event it will refresh whenever you change something on the WS2 sheet.

    How about putting a button on WS2 that will RefreshAll? Then you will click that and it will refresh.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Registered User
    Join Date
    10-05-2012
    Location
    Minneapolis, Minnesota
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Auto-Refresh Pivot Table When Source Data Refreshes

    Thanks MarvinP. Yes the Activate code is behind WS2 and runs as expected. To clarify, I'm looking to setup the PT to refresh automatically without me having to toggle back and forth between worksheets or take any action like clicking a button. Is there a way to code a macro so that it runs in WS2 every 5 minutes refreshing the PT? Thanks again!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Can't Refresh Pivot Table When Using External Data Source
    By yenping.fu in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 05-02-2014, 06:24 AM
  2. Pivot table to refresh and source data to change using visible rows on a filtered sheet
    By papasmurfuo9 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-27-2014, 11:32 AM
  3. Automatic refresh of pivot table on changes in external data source.
    By namrata773 in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 12-04-2013, 04:43 AM
  4. Replies: 0
    Last Post: 08-14-2013, 06:31 AM
  5. Macro to refresh pivot table and update data source
    By TBO in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-01-2013, 01:09 PM
  6. [SOLVED] Auto Refresh Pivot Table Once External Data source Changes
    By djfatboyfats in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-11-2012, 10:33 AM
  7. Replies: 0
    Last Post: 03-09-2009, 09:53 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1