Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Test if clipboard empty
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Test if clipboard empty
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 on error goto 0 CLR wrote: 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 -- Dave Peterson |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Test if clipboard empty
I thought that command bars are no longer used in 2007. Was I mistaken?
"Dave Peterson" wrote: 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 on error goto 0 CLR wrote: 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 -- Dave Peterson |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Test if clipboard empty
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 "Barb Reinhardt" wrote in message ... I thought that command bars are no longer used in 2007. Was I mistaken? "Dave Peterson" wrote: 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 on error goto 0 CLR wrote: 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 -- Dave Peterson |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Test if clipboard empty
I've seen people that complain that it doesn't always work (but I don't use the
office clipboard). Maybe the routine at Chip Pearson's site will work: http://www.cpearson.com/excel/Clipboard.aspx look for: EmptyClipboard Peter T wrote: 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 "Barb Reinhardt" wrote in message ... I thought that command bars are no longer used in 2007. Was I mistaken? "Dave Peterson" wrote: 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 on error goto 0 CLR wrote: 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 -- Dave Peterson -- Dave Peterson |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Test if clipboard empty
Many thanks Dave........your suggestion does the job just fine!
Vaya con Dios, Chuck, CABGx3 "Dave Peterson" wrote in message ... 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 on error goto 0 CLR wrote: 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 -- Dave Peterson |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Test if clipboard empty
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 "Barb Reinhardt" wrote in message ... I thought that command bars are no longer used in 2007. Was I mistaken? "Dave Peterson" wrote: 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 on error goto 0 CLR wrote: 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 -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Cannot empty the clipboard | Excel Discussion (Misc queries) | |||
Clipboard empty but still get waring that clipboard is full | Excel Discussion (Misc queries) | |||
Empty clipboard | Excel Discussion (Misc queries) | |||
Clipboard empty but get cannot empty CB when trying to copy | Excel Worksheet Functions | |||
Test if Clipboard is empty | Excel Programming |