#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 400
Default Pivot Table

How do I delete an existing pivot table programatically?

Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default Pivot Table

Try this

Sub RemovePivots()
For Each PT In ActiveSheet.PivotTables
PT.PivotSelect "", xlDataAndLabel, True
Selection.Clear
Next
End Sub

Regards,
Mike

"AA2e72E" wrote:

How do I delete an existing pivot table programatically?

Thanks.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 400
Default Pivot Table

Great stuff!
Thank you very much.

"MIKE215" wrote:

Try this

Sub RemovePivots()
For Each PT In ActiveSheet.PivotTables
PT.PivotSelect "", xlDataAndLabel, True
Selection.Clear
Next
End Sub

Regards,
Mike

"AA2e72E" wrote:

How do I delete an existing pivot table programatically?

Thanks.

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
Filter lines with Pivot table and non pivot table columns Grover Charts and Charting in Excel 4 September 28th 07 03:16 AM
Filter lines with Pivot table and non Pivot table columns Grover Excel Discussion (Misc queries) 1 September 26th 07 12:48 AM
Filter lines containing pivot table and non pivot table data Grover Excel Worksheet Functions 0 September 24th 07 07:20 PM
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 11:21 PM.

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

About Us

"It's about Microsoft Excel"