+ Reply to Thread
Results 1 to 4 of 4

Pivot Table Help

  1. #1
    Wike05
    Guest

    Pivot Table Help

    Im using pivot tables to make reports for my boss in excel. But she has no
    idea how to use them so i recorded macros that set the different reports up
    for her. The problem is i need the macro to clear the current layout in the
    pivot
    table before it applies the new layout.


  2. #2
    Forum Contributor
    Join Date
    02-28-2006
    Posts
    690

    clearing pivot layouts

    Can you write a separate macro to do the clearing, and attach it to a prominent button object that she can click before resetting.

    Alternatively, put each pivot on a separate sheet and then all she needs to do is open the required sheet.

  3. #3
    Wike05
    Guest

    Re: Pivot Table Help

    i only know how to record and do some minor editing of macros. but i cant
    figure what i need to stick in the begining of the macro to have clear the
    layout, then apply the new layout.

    "robert111" wrote:

    >
    > Can you write a separate macro to do the clearing, and attach it to a
    > prominent button object that she can click before resetting.
    >
    > Alternatively, put each pivot on a separate sheet and then all she
    > needs to do is open the required sheet.
    >
    >
    > --
    > robert111
    > ------------------------------------------------------------------------
    > robert111's Profile: http://www.excelforum.com/member.php...o&userid=31996
    > View this thread: http://www.excelforum.com/showthread...hreadid=523058
    >
    >


  4. #4
    Debra Dalgleish
    Guest

    Re: Pivot Table Help

    You can hide all the fields:

    Sub ClearPivot()
    Dim pt As PivotTable
    Dim pf As PivotField
    Set pt = ActiveSheet.PivotTables(1)

    For Each pf In pt.PivotFields
    pf.Orientation = xlHidden
    Next pf

    End Sub


    Wike05 wrote:
    > Im using pivot tables to make reports for my boss in excel. But she has no
    > idea how to use them so i recorded macros that set the different reports up
    > for her. The problem is i need the macro to clear the current layout in the
    > pivot
    > table before it applies the new layout.
    >



    --
    Debra Dalgleish
    Excel FAQ, Tips & Book List
    http://www.contextures.com/tiptech.html


+ 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