Disabling Right Click Menu

  • Thread starter Thread starter Tom Monroe
  • Start date Start date
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?
 
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
 
Tom

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

Regards

Trevor
 
Oops, sorry, wrong post !


Trevor Shuttleworth said:
Tom

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

Regards

Trevor
 
Hi Tom

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

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

--
XL2002
Regards

William

(e-mail address removed)

| 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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top