Consulting

Results 1 to 5 of 5

Thread: Refresh Pivots w/ Remote Data

  1. #1
    VBAX Regular
    Joined
    Jul 2004
    Location
    Kansas City, MO
    Posts
    6
    Location

    Refresh Pivots w/ Remote Data

    I am trying to apply the solution provided in the "Solved: Auto Refresh Pivot Table..." thread. However, my data is in a separate worksheet from my pivots. Neither of the two methods I've tried (below) are cutting it. I think I just need to point the connect property of my PivotCache to my worksheet, but I don't know quite how to do that. Ideas?

    ActiveSheet.PivotTables("PivotTable2").RefreshTable
     
    ActiveSheet.PivotTables("PivotTable2").PivotCache.Refresh
    Thanks for all the help I've already received from this impressive forum! -Arty
    Last edited by Aussiebear; 04-29-2023 at 07:26 PM. Reason: Added code tags

  2. #2
    Arty -

    In your macro you need to select the sheet with the pivot table that needs to be updated or you pivot table is not named pivot table 2.

    Stapuff

  3. #3
    Arty -

    Post your macro and names of the sheets and pivot tables.

    Kurt

  4. #4
    VBAX Regular
    Joined
    Jun 2004
    Location
    Denmark
    Posts
    58
    Location
    if you are able to refresh manually, the code should work.
    If the name isn't correct it will fail. Try this instead, if you're not sure about the name.
    Please change range("A3") to a cell inside you pivottable.


    Private Sub Worksheet_Activate()
        ActiveSheet.Range("A3").PivotTable.RefreshTable
    End Sub
    br
    Tommy Bak
    Last edited by Aussiebear; 04-29-2023 at 07:27 PM. Reason: Adjusted the code tags

  5. #5
    VBAX Regular
    Joined
    Jul 2004
    Location
    Kansas City, MO
    Posts
    6
    Location
    Thanks, Tommy and Stapuff. I just needed to select my sheet. I appreciate the help!! - Arty

Posting Permissions

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