+ Reply to Thread
Results 1 to 18 of 18

Remove "All" in pivot drop down

  1. #1
    Registered User
    Join Date
    12-14-2006
    Posts
    13

    Remove "All" in pivot drop down

    Hi
    Is it possible to revmove "all' option in the pivot table drop down list ?

    THX

  2. #2
    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
    Hi,

    Not sure what you mean by "All"

    If your trying to protect the pivot thislink might help

    http://www.contextures.com/xlPivot12.html#Disable

    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 !!!

  3. #3
    Registered User
    Join Date
    12-14-2006
    Posts
    13
    Attached is the print screen what I mean by "All" option. I have a pivot report and don't want user to have option to pick "all" in the drop down list.

    THX
    Attached Files Attached Files

  4. #4
    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
    The link I provided should sort you out then

    VBA Noob

  5. #5
    Registered User
    Join Date
    12-14-2006
    Posts
    13
    will it allow user to pick other option on the list ? I am new at this, where should I insert the code ?

  6. #6
    Forum Expert Carim's Avatar
    Join Date
    04-07-2006
    Posts
    4,070
    Hi,

    You can prevent user from selecting "All" as a choice, with an event macro ...

    Please Login or Register  to view this content.
    Go to the worksheet tab
    Right click
    Select view code
    Copy code

    HTH
    Carim

  7. #7
    Registered User
    Join Date
    12-14-2006
    Posts
    13
    I am new at this. I got an error message. See attached print screen. What did I do wrong ?

    THX
    Attached Files Attached Files

  8. #8
    Forum Expert Carim's Avatar
    Join Date
    04-07-2006
    Posts
    4,070
    Hi,

    Only two possibilities ...

    1. The sheet in which you copy the code does not have a pivot table ...

    2. More probably, the pivot table name is wrong
    Place your cursor in any cell of the pivot table
    Right click
    Select Table Options
    Adjust the Name to PivotTable1 ...

    HTH
    Carim

  9. #9
    Registered User
    Join Date
    12-14-2006
    Posts
    13
    I couldn't get it work. I applied the code to the attached sample but can not get it work. Can you try ?

    THX
    Attached Files Attached Files

  10. #10
    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
    Hi,

    Try this mod on Carim's code

    Please Login or Register  to view this content.
    VBA Noob

  11. #11
    Registered User
    Join Date
    12-14-2006
    Posts
    13
    I tried it on the attached sample but could not get it to work. Did I do something wrong ?
    Attached Files Attached Files

  12. #12
    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
    Hi,

    Code goes into sheet with Pivot. As you added a new pivot it's in the wrong sheet. Select the tab "Sheet2 (2)" and then right click and add code

    VBA Noob

  13. #13
    Forum Expert Carim's Avatar
    Join Date
    04-07-2006
    Posts
    4,070
    VBA Noob ... Thanks for your help ...

    Attached is corrected worksheet ...

    HTH
    Carim
    Attached Files Attached Files

  14. #14
    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
    Carim,

    It didn't work for me until I went into sheet 3.... very strange. Working now on both sheets


    VBA Noob

  15. #15
    Forum Expert Carim's Avatar
    Join Date
    04-07-2006
    Posts
    4,070
    VBA Noob,

    Since it is a worksheet_calculate event with a pivot table, at least with XL2000, it requires either a change in the pivot table for calculate to be triggered, or adding (in any cell within the worksheet) a volatile function such as Now() or Today() and F9 ...again to fire calculate ...

    HTH
    Carim

  16. #16
    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
    Carim,

    I was changing the pivot table which should of triggered the change event.

    It didn't update until I changed sheets which I thought was strange

    VBA Noob

  17. #17
    Forum Expert Carim's Avatar
    Join Date
    04-07-2006
    Posts
    4,070
    Quite strange indeed ...
    Because it is working fine with XL2000 ...

    ...wonder if I really want to upgrade ... lol ... one of these days ...

    Cheers
    Carim

  18. #18
    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
    Maybe Santa will be good to you.

    .

+ 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