View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson Jim Thomlinson is offline
external usenet poster
 
Posts: 5,939
Default Paste Special - Values code

You have not copied anything so there is nothing to paste. That being said
you do not need to copy and paste at all. Try this one line...

Range("S1").value = range("L63").value
--
HTH...

Jim Thomlinson


"ogopogo5" wrote:

I'm trying to get this simple code working but I get this following
error message.

Run-Time error '1004':
PasteSpecial Method of Range Class Failed

The following is the code.

L63 has a code of =SUM(L20:L50)

Range("L63").Select
Selection.Cut
Range("S1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False

Is there another "paste special - values" code that will work?

Ogopogo5

*** Sent via Developersdex http://www.developersdex.com ***