I have the following macro which hides the "blank" field in the pivot table
but only works when there is data in the Pivot field, if there is not I get
an error. What I need is an IF statement to accomodate this possibility.
Help would be much appreciated.
thanks,
Mike
With ActiveSheet.PivotTables("INDUSTRIAL").PivotFields("INTERNAL ORDER
No:")
.PivotItems("(blank)").Visible = False
End With
With ActiveSheet.PivotTables("RETAIL").PivotFields("INTERNAL ORDER No:")
.PivotItems("(blank)").Visible = False
End With
With ActiveSheet.PivotTables("WAL").PivotFields("INTERNAL ORDER No:")
.PivotItems("(blank)").Visible = False
End With
End Sub
Bookmarks