View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Claus Busch Claus Busch is offline
external usenet poster
 
Posts: 3,872
Default how to get a simple macro to paste value

Hi,

Am Mon, 24 Mar 2014 16:54:35 +0000 schrieb sumesh56:

why this macro gives error message?
Runtime error'1004'
Pastespecial method of range class failed.
Sub PasteVal()
Selection.PasteSpecial Paste:=xlValues
End Sub


before you can paste you have to copy.
Try:

Sub PasteVal()
Selection.Copy
Sheets("values").Range("A1").PasteSpecial xlPasteValues
End Sub


Regards
Claus B.
--
Vista Ultimate SP2 / Windows7 SP1
Office 2007 Ultimate SP3 / 2010 Prodessional