Frek
Frek

Reputation: 169

Remove Ribbon from Excel

I'm trying to remove the ribbon bar from the Excel window. Currently I'm using the following code which removes the ribbon.

excelApp.ExecuteExcel4Macro("SHOW.TOOLBAR(""Ribbon"",False)") 

But it also removes everything above the cells including the title bar. I need the title bar so users can move, minimize, maximize and close the window. Ideally I would like to remove the entire ribbon but I would be satisfied if I could minimize the Icons on the Ribbon. I can minimize the ribbon icons by clicking the small black rectangle and triangle icon on the title bar so it must be possible.

Upvotes: 2

Views: 1367

Answers (1)

Gaijinhunter
Gaijinhunter

Reputation: 14685

Never found a good workaround, except this clever solution in VBA that you should be able to recreate in .net.

Sub HideRibbon()

Application.SendKeys ("^{F1}")

End Sub

Ctrl+F1 is the combination to minimize the ribbon and maximize it, so you can use this as a toggle button if you really wish. You could set this up to run at workbook open if you like using simple VBA.

Upvotes: 2

Related Questions