Prevent user to unhide Formula Bar

O

OMER

Hola,

I'm trying to write code to prevent user to UNHIDE the Formula Bar. The
following command actually hides it:

Application.DisplayFormulaBar = False

but the user still can go to View menu and check the Formula Bar back.

I want it to hide it and prevent the user to unhide it as long as the
workbook is open.

Any suggestions are welcome.

Regards,
OMER
 
R

Rick Rothstein

Do your users **need** to have access to the Ribbon (that is, is any access
they need provided by your code, a userform, etc.)? If not, we can remove
that as well...

Sub HideRibbonAndFormula()
ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",False)"
Application.DisplayFormulaBar = False
End Sub

Sub ShowRibbonAndFormula()
ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",True)"
Application.DisplayFormulaBar = True
End Sub

I gave you a "show ribbon" macro so you can turn it back on again.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top