Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 10th, 2007, 06:17 PM
Registered User
 
Join Date: Apr 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Linking two similar pivot tables together

I have three pivot tables on the same worksheet. Is it possible that if I select Janauary data on one pivot table, the other two pivot table will automaticlly show the January data as well? Currently I need to select January data for all three pivot tables in order to do the comparison. Please adivse.

I saw some posts in another forum about similar issue. Some people were talking about using PivotTableUpdate(See below). I am not familiar with those, but I am going to pick up some books at barnes and nobles to learn.

Private Sub Worksheet_PivotTableUpdate(ByVal Target As PivotTable)

    Application.EnableEvents = False

    Dim pt As PivotTable

    For Each pt In ActiveSheet.PivotTables
        pt.PivotFields("month").CurrentPage = Target.PivotFields("month").CurrentPage.Name
    Next pt

    Application.EnableEvents = True

End Sub


 
Old May 2nd, 2007, 10:09 AM
Authorized User
 
Join Date: Mar 2006
Posts: 73
Thanks: 0
Thanked 0 Times in 0 Posts
Default

that is how you would do it if the pivot tables were on the same sheet






Similar Threads
Thread Thread Starter Forum Replies Last Post
how to work pivot tables malli_kv2 Access 1 March 16th, 2007 06:34 AM
Linking pivot tables iacon Excel VBA 3 July 24th, 2006 01:25 AM
International Pivot Tables noldrini Excel VBA 0 February 8th, 2006 12:54 PM
Copy Header and Details to similar tables Mitch Access 2 February 2nd, 2005 07:34 PM
Pivot Tables smartgir Excel VBA 0 May 12th, 2004 10:08 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.