Disabling Right Click Menu

T

Tom Monroe

Can anyone tell me what the command is in VB to disable
the drop down menu that appears when the right mouse
button is clicked?
 
R

routeram

Hi Tom,

Try this. Right the worksheet tab where you want to disable right click
- select 'View code'.

Cut and paste below code in there

Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As
Boolean)
Cancel = True
MsgBox (" Right click disabled ")
End Sub


Hope that helps.

Regards,
Ram
 
T

Trevor Shuttleworth

Tom

select View | Task Pane or press Ctrl-F1 (which toggles it on and off)

Regards

Trevor
 
W

William

Hi Tom

Application.CommandBars("Cell").Enabled = False

Remember to set it back to true.....

--
XL2002
Regards

William

[email protected]

| Can anyone tell me what the command is in VB to disable
| the drop down menu that appears when the right mouse
| button is clicked?
 
Top