View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
klysell klysell is offline
external usenet poster
 
Posts: 146
Default Forcing PT page filter values to equal my cell value on summary pa

Hi,

How do I equate my pivot table page filters to a value in a cell. I have a
macro which refreshes 6 pivot tables contained in a workbook with data
contained in another workbook. I would like my macro to force all 6 pivot
tables to have a page filter which equals to a value (from a drop-down list)
that I have in cell b4 on my Summary sheet. Here a sampe of one of the pivot
table pieces of code:

ActiveSheet.PivotTables("ALL_TABLE").PivotFields(" RC").CurrentPage =
Summary!b4

Of course, I can't put "....=Summary!b4" at the end of this piece of code.
How do I force the pivot table called "ALL_TABLE" to have a page filter (or
pivot field called RC) to equal the value that I have in cell b4 on my
Summary sheet.

Thanks in advance,
Kent Lysell
--
Kent Lysell
Financial Consultant
Ottawa, Ontario
W: 613.943.9098