Activate Worksheet Function and pivot tables

Posted on 2011-09-30
Last Modified: 2012-05-12
Private Sub Worksheet_Activate()
End Sub

Open in new window


I have a single pivot table in a worksheet. I've added the above to the worksheet (as an event on activation)

I just want to know, would a full refresh of the whole worksheet (like above), refresh the pivot table as well?

Or do I have to click on pivot table and then go to 'PivotTable Tools' ribbon and click 'Refresh all'?

Question by:Shanan212
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
LVL 13

Accepted Solution

Shanan212 earned 0 total points
ID: 36892566

I figured I would put this function to capture all existing pivots and refresh them all

Private Sub Worksheet_Activate()

Dim piv As PivotTable

    For Each piv In ActiveSheet.PivotTables


    Next piv
End Sub

Open in new window

LVL 13

Author Closing Comment

ID: 36892571
This answers the question

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

724 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question