+ Reply to Thread
Results 1 to 4 of 4

Handling Pivot Tables with macros - code runs slow

  1. #1
    Forum Contributor
    Join Date
    02-07-2012
    Location
    MIA
    MS-Off Ver
    Excel 2007, 2010
    Posts
    429

    Handling Pivot Tables with macros - code runs slow

    I need help making my code run faster. My code is supposed to, upon double clicking on 1 item from a list of items that are present on a pivot table, hide all of the items but the one the user selected. Also if the user wants to show all the items again, he just has to double click on 1 of the first two cells of the list. It does what I want, but it takes a bit long to do it. Here it goes:

    Please Login or Register  to view this content.
    Thanks in advance for all your effort
    Last edited by Pichingualas; 02-12-2012 at 10:59 AM.

  2. #2
    Registered User
    Join Date
    01-24-2012
    Location
    Swindon, England
    MS-Off Ver
    Excel 2003
    Posts
    21

    Re: Handling Pivot Tables with macros - code runs slow

    It is always a good idea to use turn calculation off (as well as screen updating) using
    Application.Calculation = xlCalculationManual
    Application.Calculation = xlCalculationAutomatic

  3. #3
    Forum Expert OnErrorGoto0's Avatar
    Join Date
    12-30-2011
    Location
    I DO NOT POST HERE ANYMORE
    MS-Off Ver
    I DO NOT POST HERE ANYMORE
    Posts
    1,655

    Re: Handling Pivot Tables with macros - code runs slow

    Also use
    Please Login or Register  to view this content.
    before the code that alters the PT and then set it back to False afterwards.
    Good luck.

  4. #4
    Forum Contributor
    Join Date
    02-07-2012
    Location
    MIA
    MS-Off Ver
    Excel 2007, 2010
    Posts
    429

    Re: Handling Pivot Tables with macros - code runs slow

    Thanks! That seems to have helped

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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