View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default ALLOWING ONLY PASTE SPECIAL (URGENT)

Faraz

Please do not post in all caps. Hard on the ears.

Found this event code posted by someone you could use.

Private Sub Worksheet_Change(ByVal Target As Range)
'retain formatting when a cell is copied over
Dim myValue
With Application
.EnableEvents = False
myValue = Target.Value
.Undo
Target = myValue
.EnableEvents = True
End With
Application.CutCopyMode = False
End Sub

This is sheet event code. Right-click on the sheet tab and "View Code".

Copy/paste the above into that module.


Gord Dibben MS Excel MVP

On Fri, 29 Dec 2006 23:03:00 -0800, FARAZ QURESHI
wrote:

URGENT HELP REQUIRED!

HOW CAN OU RESTRICT A USER TO ENTER A COPIED DATA BY PASTING ONLY VALUES.

IN OTHER WORDS I DON'T WANT THE FORMAT OF THE CELLS TO BE CHANGED DUE TO
NORMAL PASTING BY CTRL+V OR HITTING ENTER.


Gord Dibben MS Excel MVP