Hide Ribbon

Brutium

Board Regular
Joined
Mar 27, 2009
Messages
188
Hello All,

I am trying to hide most of my ribbon. with the following VBA code

HTML:
Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",False)"

I am able to hide the Excel Ribbon in my workbook, but I want to accomplish is make sure that the File tab is always visible. How can I accomplish this?
Any Help would be GREATLY appreciated.

Brutium
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Try this:

Code:
Private Sub WorkBook_Open()
      Application.ScreenUpdating = False
      Application.CommandBars("Worksheet menu bar").Enabled = False
      Application.DisplayFullScreen = True
      Application.CommandBars("Full Screen").Visible = True
      Application.DisplayFormulaBar = False
      Application.ScreenUpdating = True
End Sub


Code:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
    Application.CommandBars("Worksheet menu bar").Enabled = True
    Application.DisplayFullScreen = False
    Application.CommandBars("Full Screen").Visible = False
    Application.DisplayFormulaBar = True
End Sub
 
Upvote 0
Thank you Danny
The first set of code will hide everything, even the menu bar. The second I am bnot sure what it does since nothing seems to happen.

What I need to do is have the ribbon disappear, but leave the FILE tab active so that the user of my workbook will be able to conduct some of the functions found under FILE, such as "Open", "Save", Save As", "Print". These are the only ones I really need.

Thank you for your help...

Much appreciated!

Brutium
 
Upvote 0
Hello DannyBohlen or anyone else who might have an answer...

I can modify the code you provided me yesterday, but I was wondering, is there a way that I can activate only the "FILE" tab of the Ribbon?:confused:
 
Upvote 0

Forum statistics

Threads
1,226,739
Messages
6,192,739
Members
453,755
Latest member
IQBS

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