Results 1 to 2 of 2

Pivot Table Will Not Filter A Single Character Item

Threaded View

  1. #1
    Registered User
    Join Date
    03-26-2012
    Location
    Indiana, USA
    MS-Off Ver
    Excel 2007
    Posts
    4

    Pivot Table Will Not Filter A Single Character Item

    I am coding in excel 2007 vba to create a pivot table based on data on the tab. Although my code is more complicated than the code below, I believe I have narrowed my problem down to the fact that whenever I attempt to filter a single character value I encounter a Run-time error '1004': Unable to get the PivotItems property of the PivotField class.

    As an example I ran the following code which worked:
    ActiveSheet.PivotTables("Tentatives_Summary_PivotTable").PivotFields("FAMILY").PivotItems("(blank)").Visible = False 
    ActiveSheet.PivotTables("Tentatives_Summary_PivotTable").PivotFields("FAMILY").PivotItems("Test").Visible = False
    'this works

    However, when filtering for "J" I encounter the run-time error '1004':
    ActiveSheet.PivotTables("Tentatives_Summary_PivotTable").PivotFields("FAMILY").PivotItems("J").Visible = False
    'this does not work
    Attached Images Attached Images
    Last edited by arlu1201; 03-26-2012 at 09:07 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