updated your code below please try that

Application.Calculation = xlCalculationManual
   With Worksheets("PivotTable2").PivotTables(1)
       For i = 1 To 6
           For x = 1 To .PivotFields(i).PivotItems.Count
               .PivotFields(i).PivotItems(x).Visible = True
           Next
       Next
   End With

Application.Calculation = xlCalculationAutomatic


On Wed, Feb 18, 2009 at 9:04 PM, TimoHubbard <tim.hubb...@gmail.com> wrote:

>
> I am running this code on a pivot table to reselect all the items that
> I have previously unselected.  It is taking too long to run because it
> is updating the pivot table each time.  It says "Calculating
> PivotTable".  Is there any way to pause the calculations of a pivot
> table?
>




>
>    With Worksheets("PivotTable2").PivotTables(1)
>        For i = 1 To 6
>            For x = 1 To .PivotFields(i).PivotItems.Count
>                .PivotFields(i).PivotItems(x).Visible = True
>            Next
>        Next
>    End With
>
> Thanks!
> Tim
>
> >
>


-- 
Thanks & Regards,

Harmeet Singh

--~--~---------~--~----~------------~-------~--~----~
-------------------------------------------------------------------------------------
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com or
Ashish Jain @ 26may.1...@gmail.com
-------------------------------------------------------------------------------------
-~----------~----~----~----~------~----~------~--~---

Reply via email to