Thread: Hide Menus
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_3_] Bob Phillips[_3_] is offline
external usenet poster
 
Posts: 2,420
Default Hide Menus

Private mFormulaBar

Private Sub Workbook_BeforeClosex()
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

"LiAD" wrote in message
...
Hi,

I am trying to make several worksheets ' fiddle proof'. I have sheets
that
contain macros which will unlock the worksheets, perform the calculation
thats needed, updated the data then relock the worksheet from the click on
a
macro. Thats fine.

I just realised however that it is very simple ro ruin everything with a
simple right click on the sheet tab to delete sheets, change code etc etc.

How I eliminate this possibility?

I also have a third sheet which at the moment I've hidden. However if a
user reinstalls the menu, he goes to format unhide sheet and the magic
sheet
pops up. Is there a way of stopping this as well?

Thanks