+ Reply to Thread
Results 1 to 3 of 3

PIVOT update of all PIVOTS in all Worksheets

Hybrid View

  1. #1
    Registered User
    Join Date
    09-10-2012
    Location
    Sweden
    MS-Off Ver
    Excel 2003
    Posts
    7

    PIVOT update of all PIVOTS in all Worksheets

    Hi all,

    Is there a way to, with a VBA macro, update all PIVOTs in several worksheets without refering to the specific PIVOTS. In other words, if I add a PIVOT table in some of the sheets i should not have to update my macro.

    BR,
    Martin

  2. #2
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: PIVOT update of all PIVOTS in all Worksheets

    if you mean refresh them then
    Sub Refresh_pivots()
       Dim PC                As Excel.PivotCache
       For Each PC In ActiveWorkbook.PivotCaches
          PC.Refresh
       Next PC
    End Sub
    or you can just use
    activeworkbook.refreshall
    ;-)
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  3. #3
    Registered User
    Join Date
    09-10-2012
    Location
    Sweden
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: PIVOT update of all PIVOTS in all Worksheets

    IŽll try that. txs

+ 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