OilEconomist
Active Member
- Joined
- Dec 26, 2016
- Messages
- 439
- Office Version
- 2019
- Platform
- Windows
Thanks in advance for any suggestions for which I will give feedback.
Why is the following code not executing? I would like to deselect "Test" which exists in the Pivot Table.
Why is the following code not executing? I would like to deselect "Test" which exists in the Pivot Table.
Code:
Sub Macro7()
Dim ShtNameOld As String
ShtNameOld = "Test"
ActiveSheet.PivotTables("PivotTable1").PivotFields(ShtNameOld). _
Orientation = xlHidden
End Sub