how to change pivot table field using VBA

how to change pivot table field using VBA

Post by Anu » Thu, 17 Oct 2002 18:14:48

i want to change the data field in the pivot table using

i tried to record the macro also  , it also does't work
i don't want to use wizard.

macro record the following lines

With ActiveSheet.PivotTables("PivotTable1").CubeFields
        .Orientation = xlDataField
        .Position = 1
End With

to record the macro, i remove the AmtUS field and put the
AmtDKK field.

if i run this macro then both fields are there.
Please guide me to remove AmtDkk field from the data
portion  using VBA.

i want to use only one field at a time .
Plesae help me in the same

Thanx in advance



1. Member Filter using ADOMD in VBA for Excel XP Pivot-Table

Does anybody have code samples to select/filter dimension members for an
Excel Pivot-table?  I want users to be able to specify either an exact
member value or a "like" value (e.g. with wildcards) and find/display all
matching dimension members.  My dimension are mostly ragged parent/child
dimensions, and some are quite large, so it's a pain for users to have to
drill down the member hierarchies looking for a specific member.

Thanks in advance.

-Knute Holum

2. Recordset Merging?

3. Using VB command buttons to change pivot table views in Front Page

4. Deadlock Issues

5. Change the data source (Cube name) in the Excel Pivot table

6. RDBMS Server Feature Matrix (FAQ)

7. Changing server name in pivot table

8. Full-Text and Stored Procedures

9. Changing data source of pivot table in Excel 2k

10. Changing the data source of Pivot Table to OLAP server

11. Change format of pivot tables

12. Save changes from Pivot table

13. Changing field values in multiple tables using a form