PDA

View Full Version : Solved: Disabling cut copy paste on certain cells



tools
06-02-2008, 05:48 AM
Hi all,

I saw the article of disabling cut copy and paste in excel sheet. This article would disable the cut copy feature for the entire sheet.

Is there a way by which certain cells in the excel sheet cant be cut copied ?

Oorang
06-02-2008, 06:09 AM
Yes, but it's non-trivial. You need to redirect the shortcut keys and the standard buttons to call your own procedures that copy/paste. Then you can put your to copy/not copy condition where you want it. It's important to restore the normal interface between workbooks though so you will want to hook into the work's activate/deactivate events to turn on/off you interface replacement. And if the user enters with macro's disabled obviously they can copy all they want, so you might want to do the old force macros trick.

Here is a a copy of something similar. It will need to be modified to do what yo uwant but it should be enough to get you started: http://vbaexpress.com/kb/getarticle.php?kb_id=957