From: George on
Hi Roger - unfortunately Cleartable is for Excel 2007 - I'm using Excel 2003 - I did try it, but got a debug error. I need to be able to do the equivalent of ClearTable in 2003.

Thanks anyway.

George



Roger Govier wrote:

Hi GeorgeTryActiveSheet.PivotTables("PivotTable1").
01-Apr-10

Hi George

Try
ActiveSheet.PivotTables("PivotTable1").ClearTable

--
Regards
Roger Govier

georgec7 wrote:

Previous Posts In This Thread:


Submitted via EggHeadCafe - Software Developer Portal of Choice
Featured Product / Service Review: TekPub
http://www.eggheadcafe.com/tutorials/aspnet/ae6e21fa-3443-4134-9d2e-39384482c80e/featured-product--servic.aspx
From: Roger Govier on
Hi George

Here's a macro from Debra Dalgleish that will do the job in XL 2003

Sub ActiveCellClearPivot()

On Error Resume Next

Dim pt As PivotTable
Dim pf As PivotField

Set pt = ActiveCell.PivotTable
For Each pf In pt.VisibleFields
pf.Orientation = xlHidden
Next pf
'pt.RefreshTable

End Sub

Place your cursor on a cell within the PT before running.

--
Regards
Roger Govier

George Cruickshanks wrote:
> Hi Roger - unfortunately Cleartable is for Excel 2007 - I'm using Excel 2003 - I did try it, but got a debug error. I need to be able to do the equivalent of ClearTable in 2003.
>
> Thanks anyway.
>
> George
>
>
>
> Roger Govier wrote:
>
> Hi GeorgeTryActiveSheet.PivotTables("PivotTable1").
> 01-Apr-10
>
> Hi George
>
> Try
> ActiveSheet.PivotTables("PivotTable1").ClearTable
>
> --
> Regards
> Roger Govier
>
> georgec7 wrote:
>
> Previous Posts In This Thread:
>
>
> Submitted via EggHeadCafe - Software Developer Portal of Choice
> Featured Product / Service Review: TekPub
> http://www.eggheadcafe.com/tutorials/aspnet/ae6e21fa-3443-4134-9d2e-39384482c80e/featured-product--servic.aspx