Hide, Display and Activate Ribbon Tab/Group with getVisible and ActivateTab

If you are not familiar with creating Custom Tabs or Groups on the Ribbon with RibbonX follow the steps on this page first before you start with the examples on this page : Change the Ribbon in Mac Excel with RibbonX

In the example workbooks I show you how you can use the getVisible callback to Hide or Display a Custom Tab or Group on the Ribbon and also how to activate the tab. Note: ActivateTab is not working correct the first time you run the macro in Mac office on this moment in two of the example workbooks, there is a note in the workbooks with the problem.

To be able to Hide/Display a Tab, Group with VBA code I add getVisible="GetVisible" in the RibbonX line that add the Tab or Group to the workbook. You also see tag="YourTagName" in this xml line, we use this Tag in the code to tell which tab/group 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. Note: I also paste the RibbonX on the worksheets in the example workbooks so you not need the Custom UI Editor to see it.

Download Example files

Download the example workbooks
16-Jan-2021 (5 files)

  • Activate-Custom_Tab.xlsm
  • Different-Tab-For-Each-Worksheet.xlsm
  • Hide-Display-ContextualTabs.xlsm
  • Hide-Display-Custom-Tab.xlsm
  • Hide-Display-Group.xlsm
11/11/2024
Web design by Will Woodgate