View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default Preventing pasting except for Paste Values

I'm not sure I understand what it is you are trying to restrict. Paste
Special Values takes the output of a copied cell (or cells), normally with a
formula in it (them) and pastes the evaluated value (number or text) into a
different cell (or cells), but it also copies raw data (either numbers or
text) and pastes them as well. Exactly what it is you want to allow to be
pasted or, put another way, what is it you are trying to restrict from being
pasted?

--
Rick (MVP - Excel)


"Bob" wrote in message
...
Within this Discussion Group, I have searched for "restrict pasting" and
"prevent pasting", but I have been unable to find a thread that solves my
problem.

I want to prevent users from pasting anything in a cell except for values.
So when a user copies some data and attempts to paste it in a cell using
Edit
| Paste, Ctrl-v, the Paste button, or the right-click menu and selecting
Paste, I want the paste operation to behave as if the user had selected
Paste
Special | Values.

Can this be done programmatically? If so, and being a novice to VBA, I
would be grateful for any assistance.

Thanks,
Bob