ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Replace normal paste with Paste As Text (https://www.excelbanter.com/excel-programming/360418-replace-normal-paste-paste-text.html)

[email protected]

Replace normal paste with Paste As Text
 
I am using Excel 2000 and I have created a template for reporting with
protected cells.

Cells which I allows for data input are unprotected.

Problem is, the cells protection does not protect for changes in cell
format (I have coloured all unprotected cells with yellow background).

When someone do a copy and paste, the format of the unprotected cells
will be changed.

The only way I can think of is to intercept "CTRL-V" or the normal
paste function and change it to "Paste as Text".

How can I do this?

Please help.


moglione1[_12_]

Replace normal paste with Paste As Text
 

Selection.PasteSpecial Paste:=xlPasteValues, Operation:= _
xlNone, SkipBlanks:=False, Transpose:=False


--
moglione1
------------------------------------------------------------------------
moglione1's Profile: http://www.excelforum.com/member.php...o&userid=26414
View this thread: http://www.excelforum.com/showthread...hreadid=538369


[email protected]

Replace normal paste with Paste As Text
 
What I meant was when a person presses on the Paste icon or "CTRL-V",
instead of pasting like usual (i.e. with all formats etc), it will
only paste as text without any format.


Tom Ogilvy

Replace normal paste with Paste As Text
 
use the selectionChange event

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Application.CutCopyMode = False
End Sub


of course if macros are disabled, then this won't help

--
Regards,
Tom Ogilvy


" wrote:

What I meant was when a person presses on the Paste icon or "CTRL-V",
instead of pasting like usual (i.e. with all formats etc), it will
only paste as text without any format.




All times are GMT +1. The time now is 06:42 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com