Test if clipboard empty

C

CLR

Hi All......
This works fine in XL2k if there is something on the Clipboard, but fails
with "Run time Error" if the clipboard is empty.......

CommandBars("clipboard").Controls("clear clipboard").Execute

How might I word an IF statement to check if the Clipboard is empty or not?

TIA
Vaya con Dios,
Chuck, CABGx3
 
D

Dave Peterson

I bet you could look at one of the icons on that toolbar to see if it's enabled,
but I'd just weasel out and do:

On error resume next
'your command
 
P

Peter T

Indeed, in 2007 Commandbars have been replaced by the "Ribbon" as the UI,
although they do still exist to some extent. However since 2003 (possibly
2002 ?) the clipboard is shown in the "Task Pane".

For all versions I think simply the following should be enough

Application.CutCopyMode = False

Regards,
Peter T
 
C

CLR

Many thanks Dave........your suggestion does the job just fine!

Vaya con Dios,
Chuck, CABGx3
 
C

CLR

I've heard that too Barb, but in this case I'm using XL2000, so Dave's
suggestion worked for me.

Vaya con Dios,
Chuck, CABGx3
 
Top