• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

macro for right click option

It's something like

application.commandbars.enabled = false


But really: please don't. It will really just annoy everyone and make them hate you.
 
Hi Kalpesh ,


Is this what you are looking for ?


http://www.yogeshguptaonline.com/2009/04/macros-in-excel-disable-right-click.html


Narayan
 
But really: please don't. It will really just annoy everyone and make them hate you.

Ditto to what dan_I said. The bigger question is "what are you trying to restrict?" Taking things away tends to cause more problems than it's worth.
 
Hi kalpeshpatel,

If you want it to apply to the entire workbook, insert the following in the workbook module:

[pre]
Code:
Private Sub Workbook_SheetBeforeRightClick(ByVal Sh As Object, ByVal Target As Range, Cancel As Boolean)
Cancel = True
End Sub
if you want it in a specific sheet, insert this into the desired sheet module.

Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As Boolean)
Cancel = True
End Sub
[/pre]
 
kalpeshpatel has not responded because his colleagues came after him with a shiv for disabling right click functionality.
 
Back
Top