Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Disable Right Click In Excel

If it is possible...........

Is there any way using VBA that I can disable the right mous
button......Why.......I need to stop users from being able to use th
copy and paste functions both on the mouse and on the keyboar
shortcuts.

Is there a way to do either or both of these?

Thanks

Celtic_Avenger
:confused

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Disable Right Click In Excel

In the thisworkbook module

Private Sub Workbook_SheetBeforeRightClick( _
ByVal Sh As Object, ByVal Target As Excel.Range, _
Cancel As Boolean)
Cancel = True
End Sub


look at help in VBA at OnKey to see how to redefine Ctrl+C, Ctrl+V and
Ctrl+X

--
Regards,
Tom Ogilvy


"Celtic_Avenger " wrote in
message ...
If it is possible...........

Is there any way using VBA that I can disable the right mouse
button......Why.......I need to stop users from being able to use the
copy and paste functions both on the mouse and on the keyboard
shortcuts.

Is there a way to do either or both of these?

Thanks

Celtic_Avenger



---
Message posted from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Disable Right Click In Excel

Hi,

I don't know if copy can be disabled totally. Whatever you do you
cannot prevent the user from using the Printscreen to save what is seen
on the screen.

To disable right click.
right click on the sheet you want to diaable right click and select
'View code'. Paste the code below.

Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As
Boolean)
Cancel = True
MsgBox ("Sorry I can't allow you to do that")
End Sub

Regards,
Ram


---
Message posted from http://www.ExcelForum.com/

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Disable Right Click In Excel

Thanks Once Again Tom...........

Celtic_Avenger
:) :) :

--
Message posted from http://www.ExcelForum.com

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
disable right click on mouse jatman Excel Discussion (Misc queries) 2 June 5th 08 12:15 AM
Disable border double-click navigation in Excel weatherman Excel Discussion (Misc queries) 1 February 14th 06 09:59 PM
How do I disable border double-click navigation in Excel? jeb4nardo Excel Discussion (Misc queries) 1 August 6th 05 12:50 AM
Disable right-click fredbibi49 Excel Programming 1 June 14th 04 10:44 AM
Disable right click Rich Cooper Excel Programming 2 May 14th 04 02:54 PM


All times are GMT +1. The time now is 04:34 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"