Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 17th, 2006, 02:57 PM
Authorized User
 
Join Date: Oct 2005
Location: Summerville, SC, USA.
Posts: 48
Thanks: 0
Thanked 0 Times in 0 Posts
Default Dynamic Pivot Table Filter??

Is there anyway I can Filter one of the fields a pivot table shows based on the content of a cell?

Example:
I create a generic pivot table that shows all data but when the spreadsheet loads it looks at that cell and filters the data. Anyone know of how to make this work OR a better way to do this?

Reply With Quote
  #2 (permalink)  
Old February 21st, 2006, 01:27 AM
Registered User
 
Join Date: Feb 2006
Location: Milford, MI, USA.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Wulffman Send a message via MSN to Wulffman
Default

I am getting close to this.

I have 2 cells with drop down lists.

I have a macro that I manually fire:

Sub UpdatePivots()
    a = Worksheets("BuildQry").Cells(6, 1)
    Sheets("BuildQry").PivotTables("PivotTable2").Pivo tFields("ITDept").CurrentPage = a
    a = Worksheets("BuildQry").Cells(8, 1)
    Sheets("BuildQry").PivotTables("PivotTable4").Pivo tFields("ITName").CurrentPage = a
End Sub

This causes the pivot table to be updated based on the contents of the two cells. I am struggling with getting the macro to fire on the DropButtonClick() Event:

Private Sub Worksheet_DropButtonClick()
    a = Worksheets("BuildQry").Cells(6, 1)
    Sheets("BuildQry").PivotTables("PivotTable2").Pivo tFields("ITDept").CurrentPage = a
    a = Worksheets("BuildQry").Cells(8, 1)
    Sheets("BuildQry").PivotTables("PivotTable4").Pivo tFields("ITName").CurrentPage = a
End Sub

I will post if I get thru my struggles. Take care. -t

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to use Dynamic Filter on ObjectDataSource onlinedev ASP.NET 2.0 Basics 0 December 5th, 2007 03:21 PM
Pivot Table Dynamic Reference Data oyelesit Excel VBA 2 August 4th, 2006 07:28 AM
Pivot Table vbsolo Excel VBA 3 November 23rd, 2005 01:28 AM
Pivot Table mikeparams SQL Server 2000 1 February 9th, 2005 10:10 AM
Dynamic Filter Form, need tip jbash111 Access 3 January 24th, 2005 12:54 PM



All times are GMT -4. The time now is 03:17 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.