PivotTable - Clear all data fields

B

Bradley Searle

Hi,

I've created a PivotTable which uses control buttons to tigger a macro that
selects which Report Filters, Row Labels and Values to select for a
particular 'view'. There are three of these buttons / macros and this works
ok.

When someone selects another 'view' by pressing a different button, I have
to use the following code to clear the Pivot (otherwise the Pivot will
display the existing fields as well as the new ones):

ActiveSheet.PivotTables("Central").ClearTable

This is fine - except by using ClearTable I lose any field formats (eg. £ in
the Value fields) and the Pivot automatically applies Subtotals to every
field again.

IS there any way of clearing all the currently selected fields without using
the ClearTable function (so that my formatting remains)?

Really appreciate any help. Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top