ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Pivot Table Query (https://www.excelbanter.com/excel-programming/329017-pivot-table-query.html)

Frank

Pivot Table Query
 
I am building Pivots on the fly all works well but, how do turn off or remove
the row totals at the moment I have to right click and hide is there a way to
do this when my code builds the pivot.
TIA
Frank


Tom Ogilvy

Pivot Table Query
 
Turn on the macro recorder while you do it manually. This should give you
the code you need.

--
Regards,
tom Ogilvy

"Frank" wrote in message
...
I am building Pivots on the fly all works well but, how do turn off or

remove
the row totals at the moment I have to right click and hide is there a way

to
do this when my code builds the pivot.
TIA
Frank




joeken

Pivot Table Query
 
Hi Frank,

I'm assuming you have written the code to generate Pivot Table from your raw
data. The following code will hide the row totals.

pt.PivotFields("myRowField").Subtotals = Array(False, False, False, False,
False, False, False, False, False, False, False, False)

Give it a try and see if it works

Joe

"Frank" wrote:

I am building Pivots on the fly all works well but, how do turn off or remove
the row totals at the moment I have to right click and hide is there a way to
do this when my code builds the pivot.
TIA
Frank



All times are GMT +1. The time now is 09:58 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com