Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disable Right Click in Spreadsheet
Hi
I've found the following code to disable right clicking with a spreadsheet, however within Excel 2003 it doesn't work. Private Sub Worksheet_BeforeRightClick(ByVal Target _ As Excel.Range, Cancel As Boolean) Cancel = True 'prevents normal RClick menu from appearing End Sub Does anyone know how to stop right clicking? Cheers, Ty |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disable Right Click in Spreadsheet
try this on the code page for this workbook:
Private Sub Workbook_SheetBeforeRightClick(ByVal Sh As Object, ByVal Target As Range, Cancel As Boolean) Cancel = True 'prevents normal RClick menu from appearing End Sub or put your code on each sheet's code page. your code works here with excel 2k3 -- Gary "Tywardreath" wrote in message ... Hi I've found the following code to disable right clicking with a spreadsheet, however within Excel 2003 it doesn't work. Private Sub Worksheet_BeforeRightClick(ByVal Target _ As Excel.Range, Cancel As Boolean) Cancel = True 'prevents normal RClick menu from appearing End Sub Does anyone know how to stop right clicking? Cheers, Ty |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disable Right Click in Spreadsheet
It should work in xl2003. Perhaps you have security set to high and macros
have been silently disabled. -- Regards, Tom Ogilvy "Tywardreath" wrote in message ... Hi I've found the following code to disable right clicking with a spreadsheet, however within Excel 2003 it doesn't work. Private Sub Worksheet_BeforeRightClick(ByVal Target _ As Excel.Range, Cancel As Boolean) Cancel = True 'prevents normal RClick menu from appearing End Sub Does anyone know how to stop right clicking? Cheers, Ty |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disable Right Click in Spreadsheet
Hi
This code did the trick. Thanks :) Ty |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
disable right click on mouse | Excel Discussion (Misc queries) | |||
Disable rightc click | Excel Programming | |||
Disable Right click | Excel Programming | |||
Disable right-click | Excel Programming | |||
Disable right click | Excel Programming |