Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Setup / December 2006

Tip: Looking for answers? Try searching our database.

How to forbid ctrl+c and ctrl+X in sheet?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
GR - 23 Dec 2006 08:23 GMT
How to forbid ctrl+c and ctrl+X in sheet?
toni.gee - 23 Dec 2006 21:04 GMT
Ctrl +C (copy) and Ctrl +X (cut) are Windows shortcut keys rather than Excel
specific and I don't think its possible to disable them in Excel. I'm not
even sure that it's possible to do it in Windows - there may be a registry
tweak, but I don't know it.

What you could do is write a macro that does nothing (or something
neglibible - say, display a message that the key combination is not
available) and assign the macro to the Ctrl +C and Ctrl +X combinations. This
will not, however, prevent copying and cutting from the menus, toolbars or
context menus.

> How to forbid ctrl+c and ctrl+X in sheet?
kassie - 24 Dec 2006 03:39 GMT
You can read about this at:  
http://msdn2.microsoft.com/en-us/library/aa195807(office.11).aspx

You could use
With Application
   .OnKey "^c", "" 'Copy shortcut disabled
   .OnKey "^v", "" 'Paste shortcut disabled
End With

This basically sets these keys to nothing ("")

To enable them again, you would use
With Application
   .OnKey "^c" 'Copy shortcut enabled
   .OnKey "^v" 'Paste shortcut enabled
End With

Without the "" at the end, it returns them to their original state
Signature

Hth

Kassie Kasselman

> How to forbid ctrl+c and ctrl+X in sheet?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.