muhleebbin
Active Member
- Joined
- Sep 30, 2017
- Messages
- 252
- Office Version
- 365
- 2019
- 2016
- 2013
- 2010
- Platform
- Windows
- MacOS
- Mobile
- Web
Hi,
Can someone help me with the following code?
The issue i'm having is that "Net Change" item is really "Net Change = -#####", is it possible so that it finds any and all instances of the "Net Change" item?
Thanks in advance for your assistance
Can someone help me with the following code?
VBA Code:
Sub refreshpivot()
Dim ws As Worksheet
Dim pvt As PivotTable
Dim pf As PivotField
Set pvt = Worksheets("GL R Pivot").PivotTables("PivotTable1")
Set pf = pvt.PivotFields("Person/Description")
Application.ScreenUpdating = False
ThisWorkbook.RefreshAll
On Error Resume Next
With pf
.ClearAllFilters
.PivotItems("(blank)").Visible = False
.PivotItems("").Visible = False
.PivotItems("Net Change").Visible = False
End With
Application.ScreenUpdating = True
End Sub
The issue i'm having is that "Net Change" item is really "Net Change = -#####", is it possible so that it finds any and all instances of the "Net Change" item?
Thanks in advance for your assistance