View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
NickHK NickHK is offline
external usenet poster
 
Posts: 4,391
Default Preventing Right Click On Sheet Tab???

Simon,
If you want to stop the user modify the Structure of the WB, protect the WB
instead of/as well as the WS.

NickHK

"Simon Lloyd"
wrote in message
...

Hi all i have this code below that stops the user using right click on a
cell how do i modify it so that they can not use right click on a sheet
tab?

Regards,
Simon

Private Sub Workbook_SheetBeforeRightClick(ByVal Sh As Object, ByVal
Target As Range, Cancel As Boolean)
ActiveWindow.DisplayHeadings = False
Cancel = True
ShortcutMenus(xlWorksheetCell).Enabled = False
MsgBox "You Can Only Use Your Left Mouse Button To Make Your Choice!",
vbExclamation, "Mouse Warning"
End Sub


--
Simon Lloyd
------------------------------------------------------------------------
Simon Lloyd's Profile:

http://www.excelforum.com/member.php...fo&userid=6708
View this thread: http://www.excelforum.com/showthread...hreadid=565059