View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Debra Dalgleish Debra Dalgleish is offline
external usenet poster
 
Posts: 2,979
Default ALL;TOTAL reference help

Walter,

1. I don't know of a reference, but if you record the steps
(ToolsMacroRecord New Macro), you may get the examples you need.

2. If you enclose the item names in single quotes, they should work.

3. You could colour the first cell in the selection, e.g.:

Selection.Cells(1, 1).Interior.ColorIndex = 35

4. If you want to format the field buttons:

'===============
Dim pt As PivotTable
Dim pf As PivotField

Set pt = ActiveSheet.PivotTables(1)

On Error Resume Next
For Each pf In pt.PivotFields
pf.LabelRange.Interior.ColorIndex = 40
Next pf
'=================

wacNTN wrote:
Debra,

This was very helpful. Thanks! More questions though.

1. What other parameters besides TOTAL can be used? Is there a reference
somewhere? How do I select the GrandTotal rows?

2. My activity types are "1. Base", "2. Projects", "3. Overhead". VBA
doesn't seem to like these types. Are the periods getting in the way?

3. I want to only fill the cell with the actual lable text in it but
everything I have tried fills all the row field cells.

4. Is there a way to format the top header, where the buttons are? Right
now I am just selecting a range and formatting it but it's location can vary
depending on the PT being formatted.

Thanks for any and all help you can provide.

Walter



--
Debra Dalgleish
Contextures
http://www.contextures.com/tiptech.html