Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VBA: returning subtotal range of pivot tables?????


I need my pivot tables to retain formatting after they are refreshed.
So, I have a VBA module that does this by applying custom styles. It
returns (calls) particular ranges in the pivot table and applys a
particular custom style to each range. But, I can't figure out how to
do this to subtotals. How do you return (select/call) a subtotal range
from a pivot table???

I found this on the net but it does nothing for subtotals!:

Sub ApplyStyles()
With ActiveSheet.PivotTables(1)
TableRange1.Style = "PivLabel" '\ style for cells above row area of
table
DataBodyRange.Style = "PivData" '\ style for data area
RowRange.Style = "PivRow" '\ row area
ColumnRange.Style = "PivColumn" '\ column headings
TableRange1.EntireColumn.AutoFit '\ adjust row and cell heights to fit
new style
End With
End Sub


--
doog
------------------------------------------------------------------------
doog's Profile: http://www.excelforum.com/member.php...o&userid=32880
View this thread: http://www.excelforum.com/showthread...hreadid=526813

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
% of subtotal in pivot tables suziep Excel Worksheet Functions 1 February 20th 10 01:26 AM
Pivot Tables: Subtotal only certain columns? Robbro Excel Discussion (Misc queries) 6 December 16th 09 08:54 PM
Subtotal(s) range in Pivot Tables. Is it Missing? marwan Excel Programming 1 May 30th 05 11:00 PM
Pivot tables % of subtotal Excel GuRu Excel Discussion (Misc queries) 1 May 3rd 05 01:34 AM
Pivot Tables - Percents in subtotal orang Excel Programming 0 February 3rd 05 11:16 AM


All times are GMT +1. The time now is 10:43 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"