View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ritwik Shukla[_2_] Ritwik Shukla[_2_] is offline
external usenet poster
 
Posts: 6
Default Allow paste special only to one worksheet and not to all

Try this for paste....

Sheets("Nameof Sheet").Range("LocationofRange").PasteSpecial
Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False

-------------

"SANDIND" wrote:

I have the following code for allowing only Paste special to workbook I am
working,

I have assigned shortcut (ctrl + v) to same. I Thought that same will work
only in one sheet as I have my code in Sheet1 of workbook, but once i use
CtrlV its only pasting Value not only to other sheets but also to other
workbooks, Is there anyway to restrict that to one sheet/workbook.

Code :

Sub MyPasteValues()


If Application.CutCopyMode = False Then
Beep
Else
ActiveCell.PasteSpecial Paste:=xlPasteValues
End If
End Sub

Thanks for your help in advance,

PP