Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15

Thread: vba to add fields to pivot table, needs work

  1. #11
    Board Regular DanteAmor's Avatar
    Join Date
    Dec 2018
    Location
    México
    Posts
    6,194
    Post Thanks / Like
    Mentioned
    67 Post(s)
    Tagged
    14 Thread(s)

    Default Re: vba to add fields to pivot table, needs work

    Before running the macro try to check if you can do it manually.
    Regards Dante Amor

  2. #12
    Board Regular
    Join Date
    Mar 2006
    Posts
    149
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: vba to add fields to pivot table, needs work

    hi Dante,

    i am able to, maybe i should clarify...

    it's kinda working, but in an odd way...
    i'm able to press the buttons, and the fields will be added or be hidden, but the error will pop up alongside. it's occuring at the 2nd point it's used in the code..under the "Else Add to Rows area" :



    Else 'Add to Rows area
    pt.PivotFields(sField).Orientation = xlRowField
    shp.Fill.ForeColor.Brightness = 0

  3. #13
    Board Regular DanteAmor's Avatar
    Join Date
    Dec 2018
    Location
    México
    Posts
    6,194
    Post Thanks / Like
    Mentioned
    67 Post(s)
    Tagged
    14 Thread(s)

    Default Re: vba to add fields to pivot table, needs work

    I really don't know how to hide the fields, all I did was put your code in a cycle.
    But you must fine tune it with a table and then adjust it in the cycle.
    Regards Dante Amor

  4. #14
    Board Regular
    Join Date
    Mar 2006
    Posts
    149
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: vba to add fields to pivot table, needs work

    not sure what that means?


    Quote Originally Posted by DanteAmor View Post
    I really don't know how to hide the fields, all I did was put your code in a cycle.
    But you must fine tune it with a table and then adjust it in the cycle.

  5. #15
    Board Regular DanteAmor's Avatar
    Join Date
    Dec 2018
    Location
    México
    Posts
    6,194
    Post Thanks / Like
    Mentioned
    67 Post(s)
    Tagged
    14 Thread(s)

    Default Re: vba to add fields to pivot table, needs work

    The error is new, or did you already have it from the beginning?
    Regards Dante Amor

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •