Ribbon UI RRS feed

  • Question

  • How to collapse and expand Ribbon UI programmatically (VBA)?

    Thursday, November 26, 2020 9:19 AM

All replies

  • Sub ShowRibbon(bShow As Boolean)
        Call Application.ExecuteExcel4Macro("Show.ToolBar(""Ribbon""," & bShow & ")")
    End Sub
    In Excel 2013 and later you might first want to activate the Workbook with the ribbon you want to show or hide, and if it has multiple windows the particular window if not each in turn.
    Thursday, November 26, 2020 10:25 AM
  • Sub HideTheRibbon()
        CommandBars.ExecuteMso "HideRibbon"
    End Sub

    Thursday, December 3, 2020 9:56 PM