View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jeff S[_2_] Jeff S[_2_] is offline
external usenet poster
 
Posts: 5
Default Pivot Table - filter by a cell reference

Hi Matthew,

I'm kind of new to programming pivot tables myself, so this is guess, but
have you tried using the Name property?

ActiveSheet.PivotTables("PivotTable3").PivotFields ("Title
#2").CurrentPage.Name = TitleSelection

-jeff

Hi,

I am having trouble with some VB where I want to filter a pivot table based
upo na cell value.

Here's the problem bit ofVB I have:-


Dim TitleSelection As Range
Set TitleSelection = Worksheets("Control Sheet").Range("JnlCode")

ActiveSheet.PivotTables("PivotTable3").PivotFields ("Title
#2").CurrentPage =
TitleSelection

I.e. where I have = TitleSelection doesn't work.

Thanks in advance
Matt