If you are not familiar with creating Custom Tabs, Groups or controls on
the Ribbon with RibbonX follow the steps on this page
first before you start with the examples on this page.
In the example workbooks I show you how you can use the getVisible callback to Hide or Display a Custom Tab, Group or Control on the Ribbon.
To be able to Hide/Display a Tab, Group or Control with VBA code I add getVisible="GetVisible" in the RibbonX line that add the Tab, Group or Control to the workbook. You also see tag="YourTagName" in this xml line, we use this Tag in the code to tell which tab/group/control we want to make visible.
Use the Custom UI Editor to see or edit the RibbonX and the VBA editor to look at the code.
I also paste the RibbonX on the worksheets in the example workbooks so you
not need the
Custom UI Editor to see it.
Download the example
19-March-2013 (6 files)
1 : Hide-Display-Tab.xlsm
2 : Hide-Display-Group-Control.xlsm
3 : Hide-Display-ContextualTabs.xlsm
4 : Hide-Display-Built-in Tab-Group.xlsm
5 : Hide-Display-Built-in Tabs.xlsm
6 : Different-Tab-For-Each-Worksheet.xlsm
For more info about the example files read the information in each example file.
There is also information about the example files above in this articles on MSDN.