Quantcast
Channel: Excel IT Pro Discussions forum
Viewing all articles
Browse latest Browse all 11829

How to hide a slicer?

$
0
0

Hi,

I want to be able to totally hide the slicers in my sheet. The idea is that the user can select the slicer items they want to see and then hide the slicers afterwards in order to be able to view a clean final report.

I don't want to hide items in the slicer, I actually want to hide the slicer box. I have tried grouping rows and also hiding them and also playing around with the Position settings (i.e. Move but don't size with cells... and others), but the Slicers just stay on the sheet and get pushed down.

I could potentially set the height of the slicer to 0 height in VBA using the below code, but I'm wondering if I'm missing an easy option in Excel.

Dim PT1 As PivotTable
Dim slc1 As Slicer

    Set PT1 = Sheets("ALL").PivotTables("PVT_POS_BRANCH") '(1)
    Set slc1 = PT1.Slicers("POS_CT") '(1)
    slc1.Height = 100
I could also move the Slicers to another sheet, but this is not ideal as I want the user to see the results refresh instantly, rather than switching between sheets.

Thanks


Viewing all articles
Browse latest Browse all 11829

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>