(Solved) – Updating pivot table fields using a referenced cell in VBA


I have set my rng to be an exact match to the PivotField (“Sum of Mar-20”), can anyone help me resolve as its not working. Thank you

Sub Test1_DimCheck()

Dim daterng As Range
Set daterng = Sheets("Navigation").Range("A1")

Sheets("Global Forecast").PivotTables("PivotTable10").PivotFields(daterng). _
    Orientation = xlHidden

End Sub

Leave a Reply

Your email address will not be published. Required fields are marked *