+ Reply to Thread
Results 1 to 4 of 4

Pivot Table VBA Slow

  1. #1
    Forum Contributor
    Join Date
    07-06-2008
    Location
    NC
    Posts
    149

    Pivot Table VBA Slow

    When I go to the actual pivot table it runs fast when I sort and pick manually, but for some reason this code runs very slow in this macro?

    HTML Code: 
    Application.ScreenUpdating = False
       Application.Calculation = xlCalculationAutomatic
       
    Sheets("Pivot_Table (2)").Select
    Range("B3").Select
        With ActiveSheet.PivotTables("PivotTable5").PivotFields("Group Name")
                If Range("N1") = 1 Then
            .PivotItems("Item1").Visible = True
            .PivotItems("Item2").Visible = True
            .PivotItems("Item3").Visible = True
            .PivotItems("Item4").Visible = True
            .PivotItems("Item5").Visible = True
            .PivotItems("Item6").Visible = True
            ............
            .PivotItems("Item32").Visible = True
            End If

    I actually have this do this true or false if a certain pulldown is selected...so I have about 33 of these statements (depending upon which item is selected)

    Like I said before, if I select all or refresh..the table updates very quickly.

    There must be something different about how the 2 work????

  2. #2
    Forum Contributor
    Join Date
    07-06-2008
    Location
    NC
    Posts
    149

    Anyone???

    has to be something in the code slowing it down????

  3. #3
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Can you post a sample file. Change any confidential info as required.

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  4. #4
    Forum Contributor
    Join Date
    07-06-2008
    Location
    NC
    Posts
    149

    That may be tuff

    That may be hard.

    The data that feeds the table comes from different sheets and the whole book is now alittle over 20 meg.

    I'd have to simulate the data in one sheet then redo the pivot table.
    May take alittle bit to do, but I am willing if I can figure it out.

    thanks for offering to help....let me see what i can do

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Pivot Table - Few complicated queries
    By acsishere in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-04-2008, 05:08 PM
  2. Creating pivot table to Existing worksheet
    By Malvaro in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-29-2008, 09:30 AM
  3. To formulate a table based off a single row of Pivot data
    By money n da sank in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-31-2008, 11:28 AM
  4. bug in vba macro to create pivot table
    By maacmaac in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-30-2008, 05:27 PM
  5. a pivot table report cannot overlap another pivot table report
    By judyh in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-25-2007, 12:59 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1