Results 1 to 2 of 2

VBA & PivotField Code

Threaded View

rrhutch VBA & PivotField Code 06-20-2008, 08:42 AM
ktcm Re: VBA & PivotField Code 07-23-2021, 11:23 PM
  1. #1
    Registered User
    Join Date
    06-20-2008
    Posts
    1

    VBA & PivotField Code

    I am trying to complete some VBA code that will allow me change a filter on a
    pivottable. The code I am using is as follows:

    ActiveSheet.PivotTables("PivotTable3").PivotFields("ACADEMIC_YEAR"). _
            ClearValueFilters
        With ActiveSheet.PivotTables("PivotTable3").PivotFields("ACADEMIC_YEAR")
            .PivotItems(YrF).Visible = True
        End With
    The code properly checks to correct item based on my variable in the With
    statement. My problem is the the ClearValueFilters method before it is not
    working. I am trying to clear any PivotItems that are currently visible w/o
    have to hard card each one current visible. I though the the
    ClearValueFilters method would do this for me, but it actually makes all of
    the PivotItems visible. Any suggestions.
    Last edited by VBA Noob; 06-20-2008 at 09:05 AM.

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