Uncheck AutoFormat (Pivot Tables)

H

Hans Knudsen

I have a workbook (for training purposes) with many different pivot tables.
I want to uncheck AutoFormat table under Table Options
for each 'Refresh Data'.

Some help on the necessary code for that?

Regards
Hans Knudsen
 
D

Debra Dalgleish

Dim ws As Worksheet
Dim pt As PivotTable

For Each ws In ActiveWorkbook.Worksheets
For Each pt In ws.PivotTables
pt.HasAutoFormat = False
Next pt
Next ws
 

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