![]() Set sc = ThisWorkbook.SlicerCaches("Slicer_Group_By") Private Sub Worksheet_PivotTableUpdate(ByVal Target As PivotTable)ĭim boolFoundFirstSelect As Boolean, boolMsgSent As Boolean This code will allow just ONE item to be selected - as soon as the user tries to select another, the second one (in the order they are in the slicer) will be removed and a message sent to the user. You CAN achieve this with a pretty simple VBA macro. Crafty users will know that you can hold down control or shift to multi-select items in a slicer. ![]() However, the problem with this approach is that the user won't be allowed to click on he filters, as they will be locked too. You can then add the title of your Slicer with a text box.Īn alternative way to not allow your user to click on the Multi select button, would be to right click on your Tab -> Protect Sheet -> Select the options you want him to be able to play with. One way I removed the Multi-Select button before giving to client, is that I right clicked on the Slicer, clicked Slicer Settings (the last one), and then untick Display Header. If you do that, you allow the user to only select 1 year at a time, OR, the user can clear filter with the button next to it (shown with blue in picture below), to select all elements (years in this case) of the slicer. You can select the "Multi-Select" filter to disable it, shown below: IIUC, you only want to give the ability to select either 1 value from the slicer, or have all selected.Īssume I have a slicer that has 5 elements 2015, 2016, 2017, 2018, 2019 like below:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |