Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
xlPasteValues is Empty
How can I test that there is something to paste so that executing this line
of code does not return an error 1004. I am not capturing anything via VBA. I am just wanting to paste what is in the clipboard. But if nothing is there I get the error. Thanks! Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
xlPasteValues is Empty
How about just error wrapping it
On Error Resume Next Selection.PasteSpecial Paste:=xlPasteValues, _ Operation:=xlNone, _ SkipBlanks:=False, _ Transpose:=False On Error Goto 0 HTH Bob "Mike H." wrote in message ... How can I test that there is something to paste so that executing this line of code does not return an error 1004. I am not capturing anything via VBA. I am just wanting to paste what is in the clipboard. But if nothing is there I get the error. Thanks! Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
xlPasteValues is Empty
Gosh, Bob. That was too simple! I will certainly solve it that way. I've
done that many times before but had a senior moment this time, I s'pose! Thanks! "Bob Phillips" wrote: How about just error wrapping it On Error Resume Next Selection.PasteSpecial Paste:=xlPasteValues, _ Operation:=xlNone, _ SkipBlanks:=False, _ Transpose:=False On Error Goto 0 HTH Bob "Mike H." wrote in message ... How can I test that there is something to paste so that executing this line of code does not return an error 1004. I am not capturing anything via VBA. I am just wanting to paste what is in the clipboard. But if nothing is there I get the error. Thanks! Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
xlPasteValues | Excel Programming | |||
How to set Paste:=xlPasteValues for all paste operations? | Excel Programming | |||
Ron de Bruin - Using PasteSpecial (xlPasteValues) instead of Copy | Excel Programming | |||
Check if clipboard is empty before .PasteSpecial xlPasteValues | Excel Programming | |||
ActiveCell.PasteSpecial (xlPasteValues) hangs program | Excel Programming |