Minimize Ribbon

ExcelRoy

Well-known Member
Joined
Oct 2, 2006
Messages
2,540
Office Version
  1. 365
Platform
  1. Windows
Hi all,

could i please ask for a line of code to minimize the ribbon, then to expand the ribbon

Only to minimize and not remove

Many thanks
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Try:
Code:
CommandBars.ExecuteMso "MinimizeRibbon"
 
Upvote 0
Hi JoeMo,

Sorry this doesnt work?
I have the following code so far
Code:
Private Sub Workbook_Open()
    Application.Goto Cells(1)
    Application.DisplayFormulaBar = False
    Application.DisplayStatusBar = False
    ActiveWindow.DisplayWorkbookTabs = False
    ActiveWindow.DisplayHorizontalScrollBar = False
    ActiveWindow.DisplayVerticalScrollBar = False
    ActiveWindow.DisplayHeadings = False
End Sub
Thanks
 
Last edited:
Upvote 0
Hi JoeMo,

Sorry this doesnt work?
I have the following code so far
Code:
Private Sub Workbook_Open()
    Application.Goto Cells(1)
    Application.DisplayFormulaBar = False
    Application.DisplayStatusBar = False
    ActiveWindow.DisplayWorkbookTabs = False
    ActiveWindow.DisplayHorizontalScrollBar = False
    ActiveWindow.DisplayVerticalScrollBar = False
    ActiveWindow.DisplayHeadings = False
End Sub
Thanks
Put the procedure below in a standard module and then add this line to your Workbook_Open event macro:
Call MinRibbon

Code:
Sub MinRibbon()
CommandBars.ExecuteMso "MinimizeRibbon"
End Sub
 
Upvote 0
Hi JoeMo,

many thanks, I take it I just change Minimize to Maximize to unhide

Thanks
 
Upvote 0
Hi JoeMo,

Still not working, may the problem be I am using 2007?

Thanks
 
Upvote 0
Hi JoeMo,

many thanks, I take it I just change Minimize to Maximize to unhide

Thanks
You are welcome. NO - if the ribbon is minimized, just run the MinRibbon procedure again to maximize it.
 
Upvote 0
Hi JoeMo,

Still not working, may the problem be I am using 2007?

Thanks
Yes, that's likely your problem - I'm running Excel 2010. Untested, but a possible alternative is to replace the CommandBars.ExecuteMso ... line with this:

Application.SendKeys "^{F1}"
 
Upvote 0
This also may work:

ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"", true )"

Change the true to false to hide it. But it really hides more than the ribbon, the QAT too.
 
Upvote 0
Hi JiMoe,

Maybe I was a bit forward as I cannot seem to get it working, could it be because I am using 2007?

Thanks
 
Upvote 0

Forum statistics

Threads
1,214,911
Messages
6,122,198
Members
449,072
Latest member
DW Draft

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top