Domski
Well-known Member
- Joined
- Jan 18, 2005
- Messages
- 7,292
Hi,
I have a sheet with about twenty pivot tables whose page fields are controlled with VBA.
What I want to do is test each table to find out if the grand total is zero.
I thought this might return the total:
in a similar way to the GETPIVOTDATA function works but all it returns is M/Km.
I guess I could use the GETPIVOTDATA function in VBA but thought there might be a better way.
Cheers,
Dom
I have a sheet with about twenty pivot tables whose page fields are controlled with VBA.
What I want to do is test each table to find out if the grand total is zero.
I thought this might return the total:
Code:
ActiveSheet.PivotTables("PivotTable1").PivotFields("M/Km").Value
in a similar way to the GETPIVOTDATA function works but all it returns is M/Km.
I guess I could use the GETPIVOTDATA function in VBA but thought there might be a better way.
Cheers,
Dom