I would like to remove options from the menu that pops up when you right click a slicer.
More specifically, I would like to remove "Remove", "Cut", "Refresh", the two sort options and "Report Connections".
I have tried to follow a similar approach to :
Application.CommandBars("Cell").Controls("Cut").Delete
To find the proper names, I have looped over all commandbars and their controls to find anything about "Slicer" and all they are all under commandbar "Nil".
The control don't have a name property, they have a caption but it looks like you have to remove the "&" otherwise it throws an error.
I have started with the "Remove" option, tried with the caption name (removing the "&") and also tried with the index number, neither of them throw and error, but they don't remove the option from the menu.
Application.CommandBars("Nil").Controls("Remove Slicers").Delete
Application.CommandBars("Nil").Controls(198).Delete
I have tried with other Remove controls, index 17, 18, 198, 200 but none of them changed anything.
Is there something else I am missing?
Thanks in advance