View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
GS[_6_] GS[_6_] is offline
external usenet poster
 
Posts: 1,182
Default Pivot Table run-time error 1004 (PivotField class)

Oops.., forgot to refresh...

Dim sCatNum$, vItem
If (Target.Column = 4) Then
'Cancel EditMode and get Catalog Number
sCatNum = Target.Value: Cancel = True
With Sheets("Slicers (all)").PivotTables("PivotSlicer")
With .PivotFields("Catalog #")
.ClearAllFilters
Application.EnableEvents = False
For Each vItem In .PivotItems
vItem.Visible = (vItem = sCatNum)
Next 'vItem
Application.EnableEvents = True
End With '.PivotFields("Catalog #")
.RefreshTable
End With 'Sheets("Slicers (all)").PivotTables("PivotSlicer")
End If '(Target.Column = 4)

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion