Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default Delete a Pivot Table

I have a Worksheet with a bunch of Controls (combo boxes, text boxes, etc)
and a Pivot Table. I need to be able to programmatically delete or remove the
Pivot Table without deleting the Worksheet (because I need to keep the
Controls intact). Does anyone know how to do that? BTW, even if it can't be
done programmatically, is there a way to do it manually? Thanks in advance.
Best Regards,
Dean
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default Delete a Pivot Table


Dean,
The help file is not much help on this one.
(I think the summer intern must have come up with this one)<g

ActiveSheet.PivotTables("name").TableRange2.Clear
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)


"SaeOngJeeMa"

wrote in message
I have a Worksheet with a bunch of Controls (combo boxes, text boxes, etc)
and a Pivot Table. I need to be able to programmatically delete or remove the
Pivot Table without deleting the Worksheet (because I need to keep the
Controls intact). Does anyone know how to do that? BTW, even if it can't be
done programmatically, is there a way to do it manually? Thanks in advance.
Best Regards,
Dean
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,979
Default Delete a Pivot Table

To delete the first pivot table on the active sheet:

ActiveSheet.PivotTables(1).TableRange2.Clear


SaeOngJeeMa wrote:
I have a Worksheet with a bunch of Controls (combo boxes, text boxes, etc)
and a Pivot Table. I need to be able to programmatically delete or remove the
Pivot Table without deleting the Worksheet (because I need to keep the
Controls intact). Does anyone know how to do that? BTW, even if it can't be
done programmatically, is there a way to do it manually? Thanks in advance.
Best Regards,
Dean



--
Debra Dalgleish
Contextures
http://www.contextures.com/tiptech.html

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default Delete a Pivot Table

Thanks Jim and Debra. Works great!
--
Best Regards,
Dean


"Debra Dalgleish" wrote:

To delete the first pivot table on the active sheet:

ActiveSheet.PivotTables(1).TableRange2.Clear


SaeOngJeeMa wrote:
I have a Worksheet with a bunch of Controls (combo boxes, text boxes, etc)
and a Pivot Table. I need to be able to programmatically delete or remove the
Pivot Table without deleting the Worksheet (because I need to keep the
Controls intact). Does anyone know how to do that? BTW, even if it can't be
done programmatically, is there a way to do it manually? Thanks in advance.
Best Regards,
Dean



--
Debra Dalgleish
Contextures
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
trying to delete a row in the pivot table for the pivot chart babs Excel Discussion (Misc queries) 3 April 2nd 23 07:10 PM
Delete Pivot table hurriance[_5_] Excel Programming 1 June 15th 06 09:07 AM
Delete pivot table HSalim[MVP] Excel Programming 2 December 23rd 05 10:21 PM
Delete pivot table Zic[_2_] Excel Programming 2 May 25th 04 02:08 PM
Delete Pivot Table sapta Excel Programming 0 September 10th 03 05:07 AM


All times are GMT +1. The time now is 04:36 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"