ChangingPivot Table programmatically

T

Todd Huttenstine

Hey guys,

I have a pivot table and when you right click it and
select Wizard the Pivot Table Wizard Step 3 of 3 dialog
pops up. I then can change what fields the pivot table
displays by clicking on the Layout button. Now lets say I
currently have the field Sum of EID in the data section of
the table. I want to remove this field and add the field
BID into the data section. I then want it to display the
SUM of field BID. To do this manually I simply drag and
drop the feild BID into the data section of the table
wizard and then double click the field and select SUM.
Then I click OK. And then I click finish. If I wanted to
do this programmatically, how would I do this? What is
the code to do this?

Thanks.


Todd Huttenstine
 
D

Debra Dalgleish

Turn on the macro recorder as you manually perform the steps, and it
will create the code for you.
 
Top