Right Click Sheet Tab

dannyr3065

New Member
Joined
Oct 30, 2019
Messages
11
Hi, how can I hide the 'right click' options on a Worksheet Tab (not the Worksheet Cells) pls... I have a Worksheet that I lock with VBA (password) and I dont want users to be able to unlock hte Sheet through the 'right click' option, eg: Insert / Delete / Rename, etc
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
There may be some API coding that could do that, but it's way beyond me!

I hide the tabs and force the user to navigate through buttons.
 
Last edited:
Upvote 0
.
Paste this in the ThisWorkbook module :

Code:
Option Explicit


Private Sub Workbook_BeforeClose(Cancel As Boolean)
    Application.CommandBars("Ply").Enabled = True
End Sub
 
Private Sub Workbook_Open()
    Application.CommandBars("Ply").Enabled = False
End Sub
 
Upvote 0
It does work. Either close and re-open the workbook or enter Application.CommandBars("Ply").Enabled = False in the immediate window.
 
Upvote 0
.
Yes, you must close the workbook, then re-open it for it to work.

Or .. I presume you could place it in a separate macro by itself and attached a command button to it. But then,
your users would be able re-enable the Rt Click menu again if you had command buttons.

I simply did a GOOGLE search. GOOGLE I am told is my friend ?
 
Upvote 0

Forum statistics

Threads
1,223,880
Messages
6,175,152
Members
452,615
Latest member
bogeys2birdies

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