szakharov7723
Board Regular
- Joined
- Jun 22, 2018
- Messages
- 85
- Office Version
- 2019
- Platform
- Windows
When I use this code
It selects single total field. And loops through each (item labels hidden)
But when I try to use this code , it doesn't work
However this one selects all fields resulting in error later.
How can I select all dates for each item field ?
VBA Code:
Sub FormatTest1()
With ActiveSheet.PivotTables("PriceHistory").PivotFields("Description")
For i = 1 To .PivotItems.Count - 1
.PivotItems(.PivotItems(i).Name).DataRange.Select
Next i
End With
End Sub
But when I try to use this code , it doesn't work
However this one selects all fields resulting in error later.
VBA Code:
Sub FormatTest1()
With ActiveSheet.PivotTables("PriceHistory").PivotFields("Years")
For i = 1 To .PivotItems.Count - 1
.PivotItems(.PivotItems(i).Name).DataRange.Select
Next i
End With
End Sub
How can I select all dates for each item field ?