Direct from the excel help:
Private Sub Workbook_SheetBeforeRightClick(ByVal Sh As Object, _
ByVal Target As Range, ByVal Cancel As Boolean)
Cancel = True
End Sub
I placed this in "ThisWorkbook" but I get the error: "Compile Error: Event procedure declaration does not match description of event having the same name."
Similar stuff happens a lot when I try to use examples from the help, there is often something that needs to be adjusted. Is there some global problem that I'm not catching, or is it simply isolated mistakes in the Help files?
What I want to do:
I added an item to the cell shortcut menu, but it is only applicable on one sheet of one workbook. So I need some event that will disable it if any other sheet or workbook is right-clicked.
Regards,
Brian
Ideally,
Private Sub Workbook_SheetBeforeRightClick(ByVal Sh As Object, _
ByVal Target As Range, ByVal Cancel As Boolean)
Cancel = True
End Sub
I placed this in "ThisWorkbook" but I get the error: "Compile Error: Event procedure declaration does not match description of event having the same name."
Similar stuff happens a lot when I try to use examples from the help, there is often something that needs to be adjusted. Is there some global problem that I'm not catching, or is it simply isolated mistakes in the Help files?
What I want to do:
I added an item to the cell shortcut menu, but it is only applicable on one sheet of one workbook. So I need some event that will disable it if any other sheet or workbook is right-clicked.
Regards,
Brian
Ideally,