how can i add a page break before a certain field in a pivot table??
i search around and i tried something like :
Dim pf As PivotField
For Each pf In ActiveSheet.PivotTables("Tabela dināmica2").PivotFields
If (pf = "PETROLEO") Then
ActiveWindow.SelectedSheets.HPageBreaks.Add Before:=pf
End If
Next pf
but its not working, it gives me no error message and its not adding a page break ....
someone can give me a hand pleasE?
Bookmarks