![]() |
disable right click on mouse
is it possible to disable the right click (copy/cut/paste) on a mouse in
excel spreadsheet. jatman |
disable right click on mouse
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 On Wed, 4 Jun 2008 15:55:03 -0700, jatman wrote: is it possible to disable the right click (copy/cut/paste) on a mouse in excel spreadsheet. jatman |
disable right click on mouse
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. -- Jim "jatman" wrote in message ... is it possible to disable the right click (copy/cut/paste) on a mouse in excel spreadsheet. jatman |
All times are GMT +1. The time now is 01:20 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com