disable new sheet insertion

F0RE5T

Board Regular
Joined
Nov 4, 2014
Messages
204
Hi

in the Private sub for when a workbook opens I include the following code:

'developers tab
Application.ShowDevTools = False
'hide ribbon
Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",False)"
'.................
'Hide formula bar
Application.DisplayFormulaBar = False
'..................
'max screen
Application.WindowState = xlMaximized
'..................
'do not show file history
Application.DisplayRecentFiles = False
'............................

The application I have built is driven from a sheet I use as a menu and the above disables certain user activity / views.

However during testing I have found that a user can right click on the "menu" sheet and still have access to the "insert" option. Though selection of this will not insert a sheet the application hangs and I cannot find a way to disable the "right click", not show "insert" or msgbox a msg to say don't .....

Can anyone help please?

many thanks
F0re5t

:confused:
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
I think it's the same in 2007 as it is in 2010

The option is on the Review Tab - Protect Workbook
 
Upvote 0
I think it's the same in 2007 as it is in 2010

The option is on the Review Tab - Protect Workbook

hi

I was hoping to use vba, so not just protect the whole workbook. I suppose I have gotten so far and not wanting to redo everything again with simply using protect workbook combinations.... am I lazy >>>

many thanks

f0re5t
 
Upvote 0
If the user is going to go to those lengths (hunting down the key combo that you found) to avoid using a spreadsheet the way its designed, does that say something about its design?
 
Upvote 0
I suppose I have gotten so far and not wanting to redo everything again
Why would you have to 'redo' everything

We're only talking about 1 small part of your overall objective.
The ability to insert sheets is not related to all the other things you've disabled..(formulabar, windowstate, showrecentfiles,etc...)
None of that woulud have to be 'redone'

Sometimes the simple solution really is the best solution.

The functionality to prevent users from inserting sheets already exists within the Excel Program as provided by MS.
Why Re-Invent another method to accomplish the same task?
 
Upvote 0

Forum statistics

Threads
1,214,918
Messages
6,122,241
Members
449,075
Latest member
staticfluids

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top