Macro to hide options ribbon of Excel when opens a workbook

Karla Bermeo

New Member
Joined
Feb 21, 2020
Messages
3
Office Version
  1. 2016
Platform
  1. Windows
Hi guys!

First of all I'm so grateful for your help on my first post. I have a new question, so I hope you can help me this time. The case is the following:

I have a macro to hide Excel ribbon options when we open a workbook, but it works only when I have the workbook open, when I close and open again the workbook, the ribbon doesn't hide. I don't know where is the problem. Btw, I also have a form to access to it, just when the person writes the right user and password:

Private Sub workbook_open()
Application.Visible = False
uf_login.Show
With ThisWorkbook.Worksheets
Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",False)"
Application.DisplayFullScreen = False
End With
End Sub

I want to hide all the toolbars (ribbon options) when a person opens the workbook, and just if it's possible, to show only some customized buttons of the quick access toolbar, as shown in the picture below:

q&a.png
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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