Hello,
So I have a pivot table with a pivotField called "Ship Month"
I need to update them with my command button to only take this month (now it is September and the field called unscheduled)
The issue is that I can't put
With ActiveSheet.PivotTables("PivotTable6").PivotFields("Ship Month")
.PivotItems("January").Visible = False
.PivotItems("February").Visible = False
.PivotItems("March").Visible = False
.PivotItems("April").Visible = False
.PivotItems("May").Visible = False
.PivotItems("June").Visible = False
.PivotItems("July").Visible = False
.PivotItems("August").Visible = False
.PivotItems("September").Visible = True
.PivotItems("October").Visible = False
.PivotItems("November").Visible = False
.PivotItems("December").Visible = False
.PivotItems("Unscheduled").Visible = True
End With
End Sub
For the simple reasons that when a month end, it will not be part of the pivot table the next day, so I will have a error because months January to August are not there
Is there a way I can unselect and and only mark as true the present month + the field called unscheduled
Thank you
So I have a pivot table with a pivotField called "Ship Month"
I need to update them with my command button to only take this month (now it is September and the field called unscheduled)
The issue is that I can't put
With ActiveSheet.PivotTables("PivotTable6").PivotFields("Ship Month")
.PivotItems("January").Visible = False
.PivotItems("February").Visible = False
.PivotItems("March").Visible = False
.PivotItems("April").Visible = False
.PivotItems("May").Visible = False
.PivotItems("June").Visible = False
.PivotItems("July").Visible = False
.PivotItems("August").Visible = False
.PivotItems("September").Visible = True
.PivotItems("October").Visible = False
.PivotItems("November").Visible = False
.PivotItems("December").Visible = False
.PivotItems("Unscheduled").Visible = True
End With
End Sub
For the simple reasons that when a month end, it will not be part of the pivot table the next day, so I will have a error because months January to August are not there
Is there a way I can unselect and and only mark as true the present month + the field called unscheduled
Thank you
