#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 386
Default Hide Menus

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
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 51
Default Hide Menus

If you are using Excel 97-2003

I use the following codes in Private Sub Workbook_Activate() in this workbook

You will need to enable the menus when exiting the spreadsheet therefore
change the code from = false to = true in Private Sub Workbook_Deactivate()

You will need to make sure that all users have macros enabled.

"LiAD" wrote:

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?


Hide the sheet tabs in ToolsOptions then disable the menu

Application.CommandBars("Worksheet Menu Bar").FindControl _
(ID:=522, Recursive:=True).Enabled = False

Disable delete sheet

Application.CommandBars("Worksheet Menu Bar").FindControl _
(ID:=847, Recursive:=True).Enabled = False

Protect your code with a password


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?


Disable sheet in the format menu

Application.CommandBars("Worksheet Menu Bar").FindControl _
(ID:=30026, Recursive:=True).Enabled = False


Thanks

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 386
Default Hide Menus

Thanks a lot for your help.

I was actually given this bit of code by another user which works well -
except that I cannot figure out how to undo it, would you know?

Also this code does not disbale the possibility of changing the sheet names
- which completely stuffs up everything. Is this also possible?

Thanks a lot
LiAD
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


"Stephen C" wrote:

If you are using Excel 97-2003

I use the following codes in Private Sub Workbook_Activate() in this workbook

You will need to enable the menus when exiting the spreadsheet therefore
change the code from = false to = true in Private Sub Workbook_Deactivate()

You will need to make sure that all users have macros enabled.

"LiAD" wrote:

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?


Hide the sheet tabs in ToolsOptions then disable the menu

Application.CommandBars("Worksheet Menu Bar").FindControl _
(ID:=522, Recursive:=True).Enabled = False

Disable delete sheet

Application.CommandBars("Worksheet Menu Bar").FindControl _
(ID:=847, Recursive:=True).Enabled = False

Protect your code with a password


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?


Disable sheet in the format menu

Application.CommandBars("Worksheet Menu Bar").FindControl _
(ID:=30026, Recursive:=True).Enabled = False


Thanks

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Want to Hide columns in spreadsheet but NOT hide data in chart. KrispyData Charts and Charting in Excel 1 March 20th 09 04:45 PM
Menus Teddytim1 Excel Discussion (Misc queries) 1 February 25th 09 03:02 PM
difference between word 2003 menus and word 2007 menus-Explain pl kali Excel Discussion (Misc queries) 1 August 29th 07 07:56 AM
New Menus - attaching but menus are reset Greegan Excel Worksheet Functions 0 November 5th 05 03:19 PM
How do I hide a worksheet in Excel and use a password to un-hide . Dchung Excel Discussion (Misc queries) 3 December 2nd 04 06:24 AM


All times are GMT +1. The time now is 01:24 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"