+ Reply to Thread
Results 1 to 3 of 3

Excel Slicer Control Greyed Out

  1. #1
    Registered User
    Join Date
    03-20-2016
    Location
    Canfield, OH
    MS-Off Ver
    2010
    Posts
    3

    Excel Slicer Control Greyed Out

    Using Excel 2010 Created a Pivot Table with VBA and now the slicer controls are greyed out. Creating the same Pivot Table manually does allow use of the slicer controls. Is this a limitation of VBA created Pivot Tables although was not able to add slicers with code and make them work either.

  2. #2
    Registered User
    Join Date
    03-20-2016
    Location
    Canfield, OH
    MS-Off Ver
    2010
    Posts
    3

    Re: Excel Slicer Control Greyed Out

    I finally cracked the case of the Greyed Out Slicer control. It's been well documented that slicers only work with Excel 2010 forward. I originally used the Pivot Cache 'Add' method to create the Pivot Table and the slicers were not available. I then used VBA Pivot Table Wizard code assuming that it would use the latest format and Excel 2010 format. It turns out that this is not the case, with the VBA Wizard code used the prior or old format as well, hence pivot table slicers are not available. This seems to be an oversight on Microsoft's part. Since Excel 2010 was being used you would think it would use the latest format, not the case. See the two code samples below to see the subtle difference. The Add method does use DefaultVersion:=xlPivotTableVersionCurrent so one would, logically at least, assume that Excel 2010 format was being used. The bottom line is that the version must be xlPivotTableVersion14 for slicers to work on VBA created Pivot Tables!

    The 'Add' Method Does Not Work:

    Set PTCache = ActiveWorkbook.PivotCaches.Add(SourceType:= _
    xlDatabase, SourceData:=PRange.Address)
    Set PT = PTCache.CreatePivotTable(TableDestination:=WSP. _
    Cells(2, 2), TableName:="PivotTbl", DefaultVersion:=xlPivotTableVersionCurrent)

    Must Use the 'Create' Method:

    Set PTCache = ThisWorkbook.PivotCaches.Create _
    (SourceType:=xlDatabase, SourceData:=PRange, Version:=xlPivotTableVersion14)
    Set PT = PTCache.CreatePivotTable(TableDestination:=WSP.Cells(2, 2), _
    TableName:="PivotTable", DefaultVersion:=xlPivotTableVersion14)
    Last edited by tewmaster; 03-25-2016 at 01:17 PM.

  3. #3
    Registered User
    Join Date
    03-20-2016
    Location
    Canfield, OH
    MS-Off Ver
    2010
    Posts
    3

    Re: Excel Slicer Control Greyed Out

    I finally cracked the case of the Greyed Out Slicer control. It's been well documented that slicers only work with Excel 2010 forward. I originally used the Pivot Cache 'Add' method to create the Pivot Table and the slicers were not available. I then used VBA Pivot Table Wizard code assuming that it would use the latest format and Excel 2010 format. It turns out that this is not the case, with the VBA Wizard code used the prior or old format as well, hence pivot table slicers are not available. This seems to be an oversight on Microsoft's part. Since Excel 2010 was being used you would think it would use the latest format, not the case. See the two code samples below to see the subtle difference. The Add method does use DefaultVersion:=xlPivotTableVersionCurrent so one would, logically at least, assume that Excel 2010 format was being used. The bottom line is that the version must be xlPivotTableVersion14 for slicers to work on VBA created Pivot Tables!

    The 'Add' Method Does Not Work:

    Set PTCache = ActiveWorkbook.PivotCaches.Add(SourceType:= _
    xlDatabase, SourceData:=PRange.Address)
    Set PT = PTCache.CreatePivotTable(TableDestination:=WSP. _
    Cells(2, 2), TableName:="PivotTbl", DefaultVersion:=xlPivotTableVersionCurrent)

    Must Use the 'Create' Method:


    Set PTCache = ThisWorkbook.PivotCaches.Create _
    (SourceType:=xlDatabase, SourceData:=PRange, Version:=xlPivotTableVersion14)
    Set PT = PTCache.CreatePivotTable(TableDestination:=WSP.Cells(2, 2), _
    TableName:="PivotTable", DefaultVersion:=xlPivotTableVersion14)
    Last edited by tewmaster; 03-25-2016 at 01:19 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Trying to control a slicer using vba
    By mshellay in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-15-2016, 12:22 PM
  2. Insert slicer disabled and greyed out
    By ShaliniGomes in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 05-30-2014, 09:03 PM
  3. control slicer value with combo box
    By solatjumat in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-11-2013, 12:39 AM
  4. Move and size with cells greyed out- form control checkboxes move after printing 2010
    By Duffy1974 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-26-2012, 09:19 AM
  5. [SOLVED] Change Chart Title Depending on a Slicer - slicer advice
    By JungleJme in forum Excel General
    Replies: 8
    Last Post: 08-17-2012, 07:59 AM
  6. Activex control greyed out; driving me nuts
    By ivqancorp in forum Excel General
    Replies: 1
    Last Post: 07-08-2012, 03:45 PM

Tags for this Thread

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