+ Reply to Thread
Results 1 to 9 of 9

Macro code to update Pivot table based on criteria

Hybrid View

wish2excel Macro code to update Pivot... 09-30-2010, 03:35 AM
romperstomper Re: Macro code to update... 09-30-2010, 04:08 AM
wish2excel Re: Macro code to update... 09-30-2010, 04:22 AM
romperstomper Re: Macro code to update... 09-30-2010, 04:32 AM
wish2excel Re: Macro code to update... 09-30-2010, 04:48 AM
romperstomper Re: Macro code to update... 09-30-2010, 04:51 AM
wish2excel Re: Macro code to update... 09-30-2010, 05:30 AM
romperstomper Re: Macro code to update... 09-30-2010, 05:40 AM
wish2excel Re: Macro code to update... 09-30-2010, 05:44 AM
  1. #1
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,980

    Re: Macro code to update Pivot table based on criteria

    Hi,

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here
    Everyone who confuses correlation and causation ends up dead.

  2. #2
    Registered User
    Join Date
    08-19-2010
    Location
    Kerala, India
    MS-Off Ver
    Excel 2003
    Posts
    41

    Re: Macro code to update Pivot table based on criteria

    I am so sorry for that, since i was posting it from my office, i totally for got about that. usually I do it from my home.
    let me try it again

    Option Explicit
    
    Sub UpdatePT()
        ActiveSheet.PivotTables("PivotTable1").RefreshTable
        ActiveSheet.PivotTables("PivotTable2").RefreshTable
        ActiveSheet.PivotTables("PivotTable4").RefreshTable
        ActiveSheet.PivotTables("PivotTable5").RefreshTable
        ActiveSheet.PivotTables("PivotTable1").PivotFields("Month").CurrentPage = Range("MonthSelect") * 1
        ActiveSheet.PivotTables("PivotTable2").PivotFields("Month").CurrentPage = Range("MonthSelect") * 1
        ActiveSheet.PivotTables("PivotTable4").PivotFields("Month").CurrentPage = Range("MonthSelect") * 1
        ActiveSheet.PivotTables("PivotTable5").PivotFields("Month").CurrentPage = Range("MonthSelect") * 1
    End Sub
    I hope that was OKAY

+ 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