View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Frank Hayes Frank Hayes is offline
external usenet poster
 
Posts: 18
Default PasteSpecial method of Range class failed

I am trying to write what I thought would be a very simple macro, but I am
encountering a "PasteSpecial method of range class failed" runtime error.
The intent of the macro is to take a range that has previously been selected
by the user and to copy the values and format of the range into a new
cell(s).

I have commented out the original select.copy (as this is the action the
user now takes). Any ideas?

Sub PasteFormatValues()
'
' Range("C10:F10").Select
' Selection.Copy
' Range("C13").Select

Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:=
_
False, Transpose:=False
Selection.PasteSpecial Paste:=xlFormats, Operation:=xlNone, SkipBlanks:=
_
False, Transpose:=False
Application.CutCopyMode = False

End Sub


Thank you,

Frank Hayes