View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.misc
FARAZ QURESHI FARAZ QURESHI is offline
external usenet poster
 
Posts: 553
Default ALLOWING ONLY PASTE SPECIAL (URGENT)

sorry sir(s)
but sure was in a panic due to a new project with tight deadline.
thanx 4 the xclent vba assistance.
regards
faraz

"Gord Dibben" wrote:

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