VBA auto hide ribbon in Excel 2013

前端 未结 7 2123
慢半拍i
慢半拍i 2020-12-14 12:13

How to Auto-hide Ribbon in Excel 2013 in VBA? I would like to achieve exactly what I get by clicking on the upper arrow icon at the right top of Excel menu mark

7条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-14 12:36

    Probably you should do something a little more complicated:

    Use CommandBars.ExecuteMso "MinimizeRibbon" to show/hide the ribbon. Depending on what you want, you may show/hide all other tabs in the ribbon. E.g. use something of the code here -> Excel Hide/Show all tabs on Ribbon except custom tab

    Thus 2 steps:

    Step 1 - show or hide with the CommandBars.ExecuteMso

    Step 2 - show or hide the rest of the tabs with some macros from the link.

    A little big workaround, but you will get what you want.

提交回复
热议问题