View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jan Kronsell[_3_] Jan Kronsell[_3_] is offline
external usenet poster
 
Posts: 34
Default Pasting values from a closed Excel instance

I copy a cell containing a date from a sheet of one instance of Excel. Then
closes Excel down. In another instance of Excel I like to PasteSpecial the
value of the cell. The pasting part is what I like to do using VBA. But if I
record a macro it comes up with

ActiveSheet.PasteSpecial Format:="Text"...

So its the text value of the date thats pasted, not the numeric value.

If I try using

Selection.PasteSpecial Paste:=xlPasteValues

I get a runtime error 1004: The method PasteSpecial of class Range failed.

(My own translation from a danish version of Excel, so it may bw incorrect,
but I hope you get the idea.

How should I accomplish what I need?

Jan