View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Bassman62 Bassman62 is offline
external usenet poster
 
Posts: 117
Default How to test for valid 'Paste:=xlValues' before attempt.

I have code that pastes values at the current selection.
This works fine when the 'copy' is within excel.
However, occasionally the source may be from another application in which
case the 'Paste:=xlValues' fails.
Is there a way to test to see if 'Paste:=xlValues' is a valid option before
using it in the following code?
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Thank you.

Dave