Context menu suppression by right-click in Excel

Solved
supermoun -  
gfortin9 Posted messages 1 Status Member -
Hello everyone,

Is it possible, when opening an Excel workbook, to remove the right-click context menu in one or more sheets?

Thanks for the answer
Configuration: Windows XP Firefox 2.0.0.12

3 answers

gbinforme Posted messages 14930 Registration date   Status Contributor Last intervention   4 744
 
hello

remove the right-click menu from the mouse in one or more sheets.

To remove it on all sheets, put this in thisworkbook
Private Sub Workbook_SheetBeforeRightClick(ByVal Sh As Object, ByVal Target As Range, Cancel As Boolean) Cancel = True End Sub

To remove it on a single sheet, put this in each concerned sheet
Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As Boolean) Cancel = True End Sub

--

Always zen
2
supermoun Posted messages 39 Status Member 7
 
Hello GBinforme, Excuse the delay. I tried it in the sheet, it’s ok. For the workbook, it doesn’t work. See you later
0
gbinforme Posted messages 14930 Registration date   Status Contributor Last intervention   4 744
 
hello

for the workbook, it doesn't work.

You surprise me a lot and verify that you have Workbook_SheetBeforeRightClick( in the VBA sheet of thisworkbook
--

Always zen
0
supermoun Posted messages 39 Status Member 7
 
Hello GBinforme, It's good for the binder. See you.
0
gfortin9 Posted messages 1 Status Member
 
Hello!

Sorry, interpretation error 8- /

Tourlou...
0