View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 10,593
Default How to disable and hide ALL menu in Excel 2007?

Option Explicit

Private mFormulaBar

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Dim oCB As CommandBar
For Each oCB In Application.CommandBars
oCB.Enabled = True
Next oCB

Application.DisplayFormulaBar = mFormulaBar
End Sub

Private Sub Workbook_Open()
Dim oCB As CommandBar
For Each oCB In Application.CommandBars
oCB.Enabled = False
Next oCB

mFormulaBar = Application.DisplayFormulaBar
Application.DisplayFormulaBar = False
End Sub

'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code



--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Marcus" wrote in message
...
Hi guys,

I need your help !!

Any idea how to disable in VBA all menus in EXCEL 2007?

On the top of that I need to hide also the main title on the top with
Excel
+ name of the file appear - so it doesn't look Excel any more

Many thanks for your precious help!

Yvan