ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Classic PivotTable Layout (https://www.excelbanter.com/excel-programming/417147-classic-pivottable-layout.html)

Kirk P.

Classic PivotTable Layout
 
I wish there was a default setting to force pivot tables to use the "classic"
layout, but failing that, I'm looking to create a macro that runs whenever a
pivot table is created. I've got this code that works, but only within the
current workbook. How do you get Excel to automatically recognize when a
pivot table is being created to change the layout to classic?

With ActiveSheet.PivotTables("PivotTable1")
.InGridDropZones = True
.RowAxisLayout xlTabularRow
End With

Jim Thomlinson

Classic PivotTable Layout
 
So you are looking for an event that fires when a pivot table is created.
That is a bit of a problem as there is no event specific to that. There is
one that fires on update that executes when a table is created. It however
also runs on each update. If you use that event it will change to Classic
look at each update which probably does not work for you but that is up to
you.

Here is a link to App level events...
http://www.cpearson.com/excel/AppEvent.aspx
--
HTH...

Jim Thomlinson


"Kirk P." wrote:

I wish there was a default setting to force pivot tables to use the "classic"
layout, but failing that, I'm looking to create a macro that runs whenever a
pivot table is created. I've got this code that works, but only within the
current workbook. How do you get Excel to automatically recognize when a
pivot table is being created to change the layout to classic?

With ActiveSheet.PivotTables("PivotTable1")
.InGridDropZones = True
.RowAxisLayout xlTabularRow
End With



All times are GMT +1. The time now is 07:30 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com