keep pivotchart formatting

P

Pmxgs

Hi!

Is it possible to keep all the formatting in a pivotchart after i refresh
the data.
Although i check the preserve formatting option, every time i refresh tha
data, i loose all the changes i made in the chart, and it allways goes back
to the default excel formatting.

Thanks
 
L

Luis Rentería

You may set the property "HasAutoFormat" to False.

The code would be like the following:

ActiveSheet.PivotTables("PivotTable1").HasAutoFormat = False.

Regards.
 
T

Tushar Mehta

Some of the formatting is not retained intentionally, some should be
but isn't (search the support.microsoft.com for more on this bug), and
some is.

If it is important to retain all formatting, write a macro to do the
needful. To do so, turn on the macro recorder (Tools | Macro > Record
new macro...), make the changes by hand, and turn off the recorder. To
check the XL generated starter code switch to the VBE.

--
Regards,

Tushar Mehta, MS MVP -- Excel
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions
 

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