View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
redf1re[_12_] redf1re[_12_] is offline
external usenet poster
 
Posts: 1
Default adding a page break in a pivot table


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
dinmica2").PivotFields
If (pf = "PETROLEO") Then
ActiveWindow.SelectedSheets.HPageBreaks.Add Befo=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?


--
redf1re
------------------------------------------------------------------------
redf1re's Profile: http://www.excelforum.com/member.php...o&userid=31258
View this thread: http://www.excelforum.com/showthread...hreadid=519480