Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Clearing Pivot table

Im using pivot tables to make reports for my boss in excel. But she has no
idea how to use them so i created macros that set the reports up for her.
The problem is i need the macro to clear the current layout in the pivot
table before it applies the new layout.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,979
Default Clearing Pivot table

As answered in microsoft.public.excel.misc --

You can hide all the fields:


Sub ClearPivot()
Dim pt As PivotTable
Dim pf As PivotField
Set pt = ActiveSheet.PivotTables(1)

For Each pf In pt.PivotFields
pf.Orientation = xlHidden
Next pf

End Sub


Wike05 wrote:
Im using pivot tables to make reports for my boss in excel. But she has no
idea how to use them so i created macros that set the reports up for her.
The problem is i need the macro to clear the current layout in the pivot
table before it applies the new layout.



--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to create pivot table from existing pivot table in excel 2007 Udayraj Dhulekar Excel Discussion (Misc queries) 2 July 8th 13 08:22 PM
Clearing cells without clearing formulas marsjune68 Excel Discussion (Misc queries) 2 April 10th 09 07:39 PM
Clearing Old data in Pivot Tables Craig Excel Discussion (Misc queries) 1 February 28th 06 03:30 PM
clearing pivot table field values graham Excel Programming 1 June 24th 04 10:35 AM
Help required with setting up a pivot table with the source on sheet1 to have the pivot table created on sheet called "report" Diana[_5_] Excel Programming 0 August 21st 03 10:19 PM


All times are GMT +1. The time now is 05:36 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"