Is there a way to test if there is data in the clip board?

USAMax

Well-known Member
Joined
May 31, 2006
Messages
843
Office Version
  1. 365
Platform
  1. Windows
I have a routine that is dependent upon pasting data. The routine will exit on the error but I would like to skip the routine before it gets that far.

Is there a way to test if there is anything that has been copied?

I'm using Excel 2010 on a Windows 8 desktop.
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
I have a routine that is dependent upon pasting data. The routine will exit on the error but I would like to skip the routine before it gets that far.

Is there a way to test if there is anything that has been copied?

I'm using Excel 2010 on a Windows 8 desktop.
Code:
Dim x as long
x = Application.CutCopyMode

x = 0 --> nothing on clip board
x = 1 --> clip board not empty
 
Upvote 0
I'm sorry Joe but it always comes back as Zero. I have one routine that is stripping data from a demographic website if it exists then, after it ends, I need to know if it collected the information before running the next routine.
 
Upvote 0
I'm sorry Joe but it always comes back as Zero. I have one routine that is stripping data from a demographic website if it exists then, after it ends, I need to know if it collected the information before running the next routine.
That puts the data, if any, on the Office clip board, but doesn't put Excel's CotCopyMode into xlCopy mode. You can see the data on the Office clip board (Home>Clipboard), but I don't know how to access that programmatically.
 
Upvote 0

Forum statistics

Threads
1,215,061
Messages
6,122,921
Members
449,094
Latest member
teemeren

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top