View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein \(MVP - VB\)[_1710_] Rick Rothstein \(MVP - VB\)[_1710_] is offline
external usenet poster
 
Posts: 1
Default Hide menus etc in Excel 2007

And, if you want to use a single routine to toggle the visibility of the
Ribbon and Formula bar between visible and not visible with each call (so
you don't have to remember or check what state it is currently in), you can
use this macro....

Sub ToggleRibbonAndFormulaBar()
ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon""," & _
CStr(Not Application.DisplayFormulaBar) & ")"
Application.DisplayFormulaBar = Not Application.DisplayFormulaBar
End Sub

Rick


"Ron de Bruin" wrote in message
...
See this page Sandy
http://www.rondebruin.nl/ribbon.htm

See the xml examples (2)

.DisplayFormulaBar = False

This is the same in 2007


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Sandy" wrote in message
...
How can I convert the following to hide the menus and ribbon in Excel
2007?

**********
Dim Wksht As Worksheet

With Application
.DisplayFormulaBar = False
.CommandBars("Worksheet Menu Bar").Enabled = False
.CommandBars("Standard").Visible = False
.CommandBars("Formatting").Visible = False
.CommandBars("Drawing").Visible = False
End With
**********

Thanks
Sandy