disable right click menu


Posted by john jameson on April 14, 2001 7:24 PM

I have a macro that is set up to run whenever you right click however, the menu for cut/copy/past etc. that is normally displayed whenever you right click is also displayed. Is there any way to disable this menu.
Thanks
JJ

Posted by Dave Hawley on April 14, 2001 8:19 PM

Hi JJ

There sure is! You use the Cancel argument to do this and set it to False>


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

Dave

OzGrid Business Applications

Posted by Ivan Moala on April 15, 2001 7:01 AM


Shorter Alternative to Daves;

Sub Disable_Shortcut()
CommandBars(21).Enabled = False
End Sub


Ivan



Posted by JJ on April 15, 2001 11:31 AM

Works Great Thanks