Disabling Right Click Menu

R

Rob Bovey

Tom said:
Can anyone tell me the code to disable the right click
menu on a worksheet?

Hi Tom,

Put this procedure in the code module located behind the workhseet whose
shortcut menu you want to disable:

Private Sub Worksheet_BeforeRightClick( _
ByVal Target As Range, Cancel As Boolean)
Cancel = True
End Sub

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *
 
G

Greg Wilson

This will toggle the enabled status of the right-click
menu:

Sub TogRightClick()
With Application.CommandBars("Cell")
..Enabled = Not .Enabled
End With
End Sub

Regards,
Greg
 
Top