J jatman Jun 4, 2008 #1 is it possible to disable the right click (copy/cut/paste) on a mouse in excel spreadsheet. jatman
G Gord Dibben Jun 5, 2008 #2 In the Immediate Window of the VBE Application.CommandBars("Cell").Enabled = False 'True to reset You may want it disabled for one worksheet but not another or one workbook and not others. Post back with more details if you want something tailored. Gord Dibben MS Excel MVP
In the Immediate Window of the VBE Application.CommandBars("Cell").Enabled = False 'True to reset You may want it disabled for one worksheet but not another or one workbook and not others. Post back with more details if you want something tailored. Gord Dibben MS Excel MVP
J Jim Rech Jun 5, 2008 #3 Application.Commandbars("Cell").Enabled = False disables the menu completely. Be sure to enable it or the user will be stuck with it this way. Another option is just to disable it on a specific sheet: Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As Boolean) Cancel = True End Sub This must be pasted into the sheet's module (right click sheet tab and click View Code. Or for an entire workbook: Private Sub Workbook_SheetBeforeRightClick(ByVal Sh As Object, ByVal Target As Range, Cancel As Boolean) Cancel = True End Sub Pasted into the ThisWorkbook module.
Application.Commandbars("Cell").Enabled = False disables the menu completely. Be sure to enable it or the user will be stuck with it this way. Another option is just to disable it on a specific sheet: Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As Boolean) Cancel = True End Sub This must be pasted into the sheet's module (right click sheet tab and click View Code. Or for an entire workbook: Private Sub Workbook_SheetBeforeRightClick(ByVal Sh As Object, ByVal Target As Range, Cancel As Boolean) Cancel = True End Sub Pasted into the ThisWorkbook module.