View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ayo Ayo is offline
external usenet poster
 
Posts: 489
Default Can't figure out this PasteSpecial error message

I keep getting this error message "PasteSpecial method of Range class failed"
in the code below at the line: "Selection.PasteSpecial Paste:=xlPasteAll" and
I can't figure out what the problem is.
Any ideas?

For Each c In insiteWS.Range("A" & insiteCurrRow & ":A" & insitelastRow &
"").Cells
If c.Value = marketName And c.Offset(0, 1).Value = NLP Then
insiteWS.Select
insiteWS.Range("A" & insiteCurrRow & ":" & insitelastColumn &
insiteCurrRow).Select
Selection.Copy
marketWS.Select
Range("A" & marketCurrRow).Select
Selection.PasteSpecial Paste:=xlPasteAll
marketCurrRow = marketCurrRow + 1
insiteCurrRow = insiteCurrRow + 1
Else
Exit For
End If
Next c