VBA auto hide ribbon in Excel 2013

前端 未结 7 2111
慢半拍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
    2020-12-14 12:25

    To get this code to work in excel 2016 you will need the following code in the "ThisWorkbook" mode.

    Credit goes to BigBen - not me

    Private Sub Workbook_Open()
    application.CommandBars.ExecuteMso "HideRibbon"
    End Sub
    

提交回复
热议问题