- To post as a guest, your comment is unpublished.· 1 years agoHi Glenn Daelman,
Sorry I didn't get your point. Would you explain with more details? Thank you for your comment.
How to disable right click on sheet tab in Excel?
This article is talking about disabling right-click on sheet tab in a workbook. Please do as below method step by step.
The following VBA script can help you to disable the right-click menu on sheet tab in Excel. Please do as follows.
1. In the workbook you need to disable the right-click function on sheet tab, press the Alt + F11 keys simultaneously to open the Microsoft Visual Basic for Applications window.
2. In the Microsoft Visual Basic for Applications window, double click ThisWorkbook on the left Project pane, then copy and paste the following VBA code into the ThisWorkbook (Code) window. See screenshot:
VBA code: Disable right click on sheet tab in Excel
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
3. Then press the Alt + Q keys simultaneously to close the Microsoft Visual Basic for Applications window.
4. Click File > Save As. In the Save As dialog box, please specify a folder where you need to save the workbook, name it in the File name box as you need, and select Excel Macro-Enabled Workbook option from the Save as Type drop-down list, and finally click the Save button.
Now the workbook has been saved as an Excel macro-enabled workbook, and the right click function on sheet tab is disabled while using this workbook.
- How to disable cut, copy and paste functions in Excel?
- How to disable the right click menu in specified worksheet or whole workbook in Excel?
- How to prevent or disable edit mode by double clicking cell in Excel?
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
- To post as a guest, your comment is unpublished.· 1 years agoHow can i get a message when i disable richt click on worksheet tab
- To post as a guest, your comment is unpublished.· 1 years agoSuperb Right Click in sheet tab is working.
- To post as a guest, your comment is unpublished.· 2 years agoPrivate Sub Workbook_Open()
Application.CommandBars("Ply").Enabled = False
this only deactivates RIGHT CLICK -- does not prevent the DOUBLE CLICK on tab from being renamed...